diff --git a/.github/workflows/ci-spectec.yml b/.github/workflows/ci-spectec.yml index b7ea336f0a..e6217df2fd 100644 --- a/.github/workflows/ci-spectec.yml +++ b/.github/workflows/ci-spectec.yml @@ -6,7 +6,6 @@ on: paths: [ spectec/**, document/** ] pull_request: - branches: [ main ] paths: [ spectec/**, document/** ] # Allows you to run this workflow manually from the Actions tab diff --git a/specification/wasm-1.0/0-aux.spectec b/specification/wasm-1.0/0-aux.spectec index 2c703f0870..04845e059a 100644 --- a/specification/wasm-1.0/0-aux.spectec +++ b/specification/wasm-1.0/0-aux.spectec @@ -29,7 +29,7 @@ def $sum(n n'*) = $(n + $sum(n'*)) ;; General sequence functions -def $opt_(syntax X, X*) : X? hint(show %2) +def $opt_(syntax X, X*) : X? hint(show %2) hint(partial) def $opt_(syntax X, eps) = eps def $opt_(syntax X, w) = w diff --git a/specification/wasm-1.0/1-syntax.spectec b/specification/wasm-1.0/1-syntax.spectec index 5566658277..feaf311220 100644 --- a/specification/wasm-1.0/1-syntax.spectec +++ b/specification/wasm-1.0/1-syntax.spectec @@ -33,11 +33,11 @@ var b : byte ;; Floating-point -def $signif(N) : nat +def $signif(N) : nat hint(partial) def $signif(32) = 23 def $signif(64) = 52 -def $expon(N) : nat +def $expon(N) : nat hint(partial) def $expon(32) = 8 def $expon(64) = 11 @@ -178,8 +178,19 @@ syntax relop_(Inn) = syntax relop_(Fnn) = | EQ | NE | LT | GT | LE | GE -syntax cvtop = - | EXTEND sx | WRAP | CONVERT sx | TRUNC sx | PROMOTE | DEMOTE | REINTERPRET +syntax cvtop__(valtype_1, valtype_2) +syntax cvtop__(Inn_1, Inn_2) = + | EXTEND sx -- if $size(Inn_1) < $size(Inn_2) + | WRAP -- if $size(Inn_1) > $size(Inn_2) +syntax cvtop__(Inn_1, Fnn_2) = + | CONVERT sx + | REINTERPRET -- if $size(Inn_1) = $size(Fnn_2) +syntax cvtop__(Fnn_1, Inn_2) = + | TRUNC sx + | REINTERPRET -- if $size(Fnn_1) = $size(Inn_2) +syntax cvtop__(Fnn_1, Fnn_2) = + | PROMOTE -- if $size(Fnn_1) < $size(Fnn_2) + | DEMOTE -- if $size(Fnn_1) > $size(Fnn_2) ;; Memory operators @@ -229,7 +240,7 @@ syntax instr/num hint(desc "numeric instruction") = ... | BINOP valtype binop_(valtype) hint(show %.%) | TESTOP valtype testop_(valtype) hint(show %.%) | RELOP valtype relop_(valtype) hint(show %.%) - | CVTOP valtype_1 valtype_2 cvtop hint(show %1.%3#_#%2) + | CVTOP valtype_1 valtype_2 cvtop__(valtype_2, valtype_1) hint(show %1.##%3#_#%2) -- if valtype_1 =/= valtype_2 | ... diff --git a/specification/wasm-1.0/3-numerics.spectec b/specification/wasm-1.0/3-numerics.spectec index aac9c98749..e3095cfef3 100644 --- a/specification/wasm-1.0/3-numerics.spectec +++ b/specification/wasm-1.0/3-numerics.spectec @@ -33,7 +33,7 @@ def $testop_(valtype, testop_(valtype), val_(valtype)) : val_(I32) hint(show %2#$_(%1)#((%3))) def $relop_(valtype, relop_(valtype), val_(valtype), val_(valtype)) : val_(I32) hint(show %2#$_(%1)#(%3, %4)) -def $cvtop__(valtype_1, valtype_2, cvtop, val_(valtype_1)) : val_(valtype_2)* +def $cvtop__(valtype_1, valtype_2, cvtop__(valtype_1, valtype_2), val_(valtype_1)) : val_(valtype_2)* hint(show %3#$__(%1,%2)#((%4))) def $wrap__(M, N, iN(M)) : iN(N) @@ -79,8 +79,8 @@ def $inot_(N, iN(N)) : iN(N) def $iand_(N, iN(N), iN(N)) : iN(N) def $ior_(N, iN(N), iN(N)) : iN(N) def $ixor_(N, iN(N), iN(N)) : iN(N) -def $ishl_(N, iN(N), u32) : iN(N) -def $ishr_(N, sx, iN(N), u32) : iN(N) hint(show $ishr_(%)^(%)#((%,%))) +def $ishl_(N, iN(N), iN(N)) : iN(N) +def $ishr_(N, sx, iN(N), iN(N)) : iN(N) hint(show $ishr_(%)^(%)#((%,%))) def $irotl_(N, iN(N), iN(N)) : iN(N) def $irotr_(N, iN(N), iN(N)) : iN(N) def $iclz_(N, iN(N)) : iN(N) diff --git a/specification/wasm-1.0/6-typing.spectec b/specification/wasm-1.0/6-typing.spectec index ba19eb0ce9..faae809568 100644 --- a/specification/wasm-1.0/6-typing.spectec +++ b/specification/wasm-1.0/6-typing.spectec @@ -233,13 +233,7 @@ rule Instr_ok/testop: rule Instr_ok/relop: C |- RELOP t relop_t : t t -> I32 - -;; TODO: move side conditions to syntax -rule Instr_ok/cvtop-reinterpret: - C |- CVTOP nt_1 nt_2 REINTERPRET : nt_2 -> nt_1 - -- if $size(nt_1) = $size(nt_2) - -rule Instr_ok/cvtop-convert: +rule Instr_ok/cvtop: C |- CVTOP nt_1 nt_2 cvtop : nt_2 -> nt_1 diff --git a/specification/wasm-1.0/8-reduction.spectec b/specification/wasm-1.0/8-reduction.spectec index 6b160730aa..26fcd3b9c1 100644 --- a/specification/wasm-1.0/8-reduction.spectec +++ b/specification/wasm-1.0/8-reduction.spectec @@ -84,10 +84,10 @@ rule Step_pure/label-vals: ;; TODO: may want a label context instead of bubbling up rule Step_pure/br-zero: - (LABEL_ n `{instr'*} val'* val^n (BR 0) instr*) ~> val^n instr'* + (LABEL_ n `{instr'*} val'* val^n (BR 0) admininstr*) ~> val^n instr'* rule Step_pure/br-succ: - (LABEL_ n `{instr'*} val* (BR $(l+1)) instr*) ~> val* (BR l) + (LABEL_ n `{instr'*} val* (BR $(l+1)) admininstr*) ~> val* (BR l) rule Step_pure/br_if-true: @@ -133,17 +133,17 @@ rule Step_pure/frame-vals: (FRAME_ n `{f} val^n) ~> val^n rule Step_pure/return-frame: - (FRAME_ n `{f} val'* val^n RETURN instr*) ~> val^n + (FRAME_ n `{f} val'* val^n RETURN admininstr*) ~> val^n rule Step_pure/return-label: - (LABEL_ n `{instr'*} val* RETURN instr*) ~> val* RETURN + (LABEL_ n `{instr'*} val* RETURN admininstr*) ~> val* RETURN ;; Traps rule Step_pure/trap-vals: - val* TRAP instr* ~> TRAP - -- if val* =/= eps \/ instr* =/= eps + val* TRAP admininstr* ~> TRAP + -- if val* =/= eps \/ admininstr* =/= eps rule Step_pure/trap-label: (LABEL_ n `{instr'*} TRAP) ~> TRAP @@ -167,6 +167,7 @@ rule Step/ctxt-instrs: -- Step: z; admininstr* ~> z'; admininstr'* -- if val* =/= eps \/ admininstr_1* =/= eps + ;; Numeric instructions rule Step_pure/unop-val: diff --git a/specification/wasm-1.0/B-soundness.spectec b/specification/wasm-1.0/B-soundness.spectec new file mode 100644 index 0000000000..e0e46e5fd5 --- /dev/null +++ b/specification/wasm-1.0/B-soundness.spectec @@ -0,0 +1,229 @@ +;; Contexts + +relation Context_ok: |- context : OK hint(macro "%context") + +rule Context_ok: + |- C : OK + -- if C = + { TYPES ft*, + FUNCS ft_2*, + GLOBALS gt*, + MEMS mt*, + TABLES tt*, + LOCALS lct*, + LABELS rt*, + RETURN rt'?, + } + -- (Functype_ok: |- ft : OK)* + -- (Globaltype_ok: |- gt : OK)* + -- (Memtype_ok: |- mt : OK)* + -- (Tabletype_ok: |- tt : OK)* + -- (Functype_ok: |- ft_2 : OK)* + + +;; Value types + +relation Val_ok: |- val : valtype + +rule Val_ok: + |- CONST t c_t : t + + +;; Result types + +relation Result_ok: |- result : valtype* + +rule Result_ok/result: + |- _VALS v* : t* + -- (Val_ok: |- v : t)* + +rule Result_ok/trap: + |- TRAP : t* + + +;; Administrative instructions + +syntax adminexpr = admininstr* + +relation Instr_ok2: store; context |- admininstr : functype + hint(prose "%3 is valid with %4") +relation Instrs_ok2: store; context |- admininstr* : functype + hint(prose "%3 is valid with %4") +relation Expr_ok2: store; context |- adminexpr : resulttype + hint(prose "%3 is valid with %4") + +rule Instr_ok2/plain: + s; C |- instr : t_1* -> t_2* + -- Instr_ok: C |- instr : t_1* -> t_2* + +rule Instr_ok2/label: + s; C |- LABEL_ n `{instr'*} admininstr* : eps -> t? + -- if |t'?| = n + -- Instrs_ok2: s; C |- instr'* : t'? -> t? + -- Instrs_ok2: s; {LABELS (t'?)} ++ C |- admininstr* : eps -> t? + +rule Instr_ok2/frame: + s; C |- FRAME_ n `{f} admininstr* : eps -> t? + -- if |t?| = n + -- Frame_ok: s |- f : C' + -- Expr_ok2: s; {RETURN t?} ++ C' |- admininstr* : t? + +rule Instr_ok2/call_addr: + s; C |- CALL_ADDR funcaddr : t_1* -> t_2* + -- Externaddr_ok: s |- FUNC funcaddr: FUNC (t_1* -> t_2*) + +rule Instr_ok2/trap: + s; C |- TRAP : t_1* -> t_2* + + +rule Instrs_ok2/empty: + s; C |- eps : eps -> eps + +rule Instrs_ok2/instr: + s; C |- admininstr : t_1* -> t_2* + -- Instr_ok2: s; C |- admininstr : t_1* -> t_2* + +rule Instrs_ok2/seq: + s; C |- admininstr_1* admininstr_2* : t_1* -> t_3* + -- Instrs_ok2: s; C |- admininstr_1* : t_1* -> t_2* + -- Instrs_ok2: s; C |- admininstr_2* : t_2* -> t_3* + +rule Instrs_ok2/frame: + s; C |- admininstr* : t* t_1* -> t* t_2* + -- Instrs_ok2: s; C |- admininstr* : t_1* -> t_2* + +rule Expr_ok2: + s; C |- admininstr* : t? + -- Instrs_ok2: s; C |- admininstr* : eps -> t? + + +;; Instances + +relation Globalinst_ok: store |- globalinst : globaltype +relation Meminst_ok: store |- meminst : memtype +relation Tableinst_ok: store |- tableinst : tabletype +relation Funcinst_ok: store |- funcinst : functype +relation Exportinst_ok: store |- exportinst : OK + +rule Globalinst_ok: + s |- {TYPE mut t, VALUE val} : mut t + -- Globaltype_ok: |- mut t : OK + -- Val_ok: |- val : t + +rule Meminst_ok: + s |- {TYPE `[n..m?], BYTES b*} : `[n..m?] + -- Memtype_ok: |- `[n..m?] : OK + -- if |b*| = $(n * $($(64 * $Ki))) + +rule Tableinst_ok: + s |- {TYPE `[n..m?] , REFS (fa?)*} : `[n..m?] + -- Tabletype_ok: |- `[n..m?] : OK + -- ((Externaddr_ok: s |- FUNC fa : FUNC ft)?)* + -- if |(fa?)*| = n + +rule Funcinst_ok: + s |- {TYPE ft, MODULE moduleinst, CODE func} : ft + -- Functype_ok: |- ft : OK + -- Moduleinst_ok: s |- moduleinst : C + -- Func_ok: C |- func : ft + +rule Exportinst_ok: + s |- {NAME nm, ADDR xa} : OK + -- Externaddr_ok: s |- xa : xt + + +;; Modules + +relation Moduleinst_ok: store |- moduleinst : context + +rule Moduleinst_ok: + s |- { TYPES functype*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + EXPORTS exportinst* } : + { TYPES functype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS functype_F*, + } + -- (Functype_ok: |- functype : OK)* + -- (Externaddr_ok: s |- GLOBAL globaladdr : GLOBAL globaltype)* + -- (Externaddr_ok: s |- FUNC funcaddr : FUNC functype_F)* + -- (Externaddr_ok: s |- MEM memaddr : MEM memtype)* + -- (Externaddr_ok: s |- TABLE tableaddr : TABLE tabletype)* + -- (Exportinst_ok: s |- exportinst : OK)* + ---- + -- if $disjoint_(name, (exportinst.NAME)*) + -- (if exportinst.ADDR <- (GLOBAL globaladdr)* (MEM memaddr)* (TABLE tableaddr)* (FUNC funcaddr)*)* + + +;; Stores + +relation Store_ok: |- store : OK + +rule Store_ok: + |- s : OK + -- (Globalinst_ok: s |- globalinst : globaltype)* + -- (Meminst_ok: s |- meminst : memtype)* + -- (Tableinst_ok: s |- tableinst : tabletype)* + -- (Funcinst_ok: s |- funcinst : functype)* + ---- + -- if s = {GLOBALS globalinst*, MEMS meminst*, TABLES tableinst*, FUNCS funcinst*} + + +;; Store extension + +relation Extend_globalinst: globalinst `<= globalinst +relation Extend_meminst: meminst `<= meminst +relation Extend_tableinst: tableinst `<= tableinst +relation Extend_funcinst: funcinst `<= funcinst +relation Extend_store: store `<= store + +rule Extend_globalinst: + {TYPE mut t, VALUE val} `<= {TYPE mut t, VALUE val'} + -- if mut = MUT \/ val = val' + +rule Extend_meminst: + {TYPE `[n..m?], BYTES b*} `<= {TYPE `[n'..m?], BYTES b'*} + -- if n <= n' + -- if |b*| <= |b'*| + +rule Extend_tableinst: + {TYPE `[n..m?], REFS ref*} `<= {TYPE `[n'..m?], REFS ref'*} + -- if n <= n' + -- if |ref*| <= |ref'*| + +rule Extend_funcinst: + {TYPE ft, MODULE mm, CODE fc} `<= {TYPE ft, MODULE mm, CODE fc} + +rule Extend_store: + s `<= s' + -- (Extend_globalinst: s.GLOBALS[a] `<= s'.GLOBALS[a] )^(a<|s.GLOBALS|) + -- (Extend_meminst: s.MEMS[a] `<= s'.MEMS[a] )^(a<|s.MEMS|) + -- (Extend_tableinst: s.TABLES[a] `<= s'.TABLES[a] )^(a<|s.TABLES|) + -- (Extend_funcinst: s.FUNCS[a] `<= s'.FUNCS[a] )^(a<|s.FUNCS|) + + +;; Configurations + +relation Frame_ok: store |- frame : context +relation State_ok: |- state : context +relation Config_ok: |- config : resulttype + +rule Frame_ok: + s |- {LOCALS val*, MODULE moduleinst} : C ++ {LOCALS t*} + -- Moduleinst_ok: s |- moduleinst : C + -- (Val_ok: |- val : t)* + +rule State_ok: + |- s; f : C + -- Store_ok: |- s : OK + -- Frame_ok: s |- f : C + +rule Config_ok: + |- s; f; admininstr* : t? + -- State_ok: |- s; f : C + -- Expr_ok2: s; C |- admininstr* : t? diff --git a/specification/wasm-2.0/1-syntax.spectec b/specification/wasm-2.0/1-syntax.spectec index aaeafc60ea..5474235933 100644 --- a/specification/wasm-2.0/1-syntax.spectec +++ b/specification/wasm-2.0/1-syntax.spectec @@ -140,7 +140,7 @@ syntax valtype hint(desc "value type") = syntax Inn hint(show I#n) = I32 | I64 syntax Fnn hint(show F#n) = F32 | F64 -syntax Vnn hint(show V#n) = V128 +syntax Vnn hint(show V#n) = vectype syntax resulttype hint(desc "result type") = @@ -152,9 +152,9 @@ syntax resulttype hint(desc "result type") = syntax packtype hint(desc "packed type") = I8 | I16 syntax lanetype hint(desc "lane type") = numtype | packtype -syntax Pnn hint(show I#n) = I8 | I16 +syntax Pnn hint(show I#n) = packtype syntax Jnn hint(show I#n) = Inn | Pnn -syntax Lnn hint(show I#n) = Inn | Fnn | Pnn +syntax Lnn hint(show I#n) = lanetype ;; External types @@ -209,6 +209,7 @@ def $lanetype(shape) : lanetype def $unpack(lanetype) : numtype def $size(valtype) : nat hint(show |%|) hint(partial) +def $vsize(vectype) : nat hint(show |%|) def $psize(packtype) : nat hint(show |%|) def $lsize(lanetype) : nat hint(show |%|) def $isize(Inn) : nat hint(show |%|) hint(inverse $inv_isize) @@ -221,6 +222,8 @@ def $size(F32) = 32 def $size(F64) = 64 def $size(V128) = 128 +def $vsize(V128) = 128 + def $psize(I8) = 8 def $psize(I16) = 16 @@ -265,10 +268,16 @@ syntax num_(Fnn) = fN($sizenn(Fnn)) syntax pack_(Pnn) = iN($psize(Pnn)) +;; TODO: HACK! lane_ should reuse num_ and pack_. +;; Original definition: +;; syntax lane_(lanetype) +;; syntax lane_(numtype) = num_(numtype) +;; syntax lane_(packtype) = pack_(packtype) +;; syntax lane_(Jnn) = iN($lsize(Jnn)) ;; HACK + syntax lane_(lanetype) -syntax lane_(numtype) = num_(numtype) -syntax lane_(packtype) = pack_(packtype) -syntax lane_(Jnn) = iN($lsize(Jnn)) ;; HACK +syntax lane_(Jnn) = iN($lsize(Jnn)) +syntax lane_(Fnn) = fN($sizenn(Fnn)) syntax vec_(Vnn) = vN($size(Vnn)) @@ -305,24 +314,33 @@ syntax relop_(Inn) = syntax relop_(Fnn) = | EQ | NE | LT | GT | LE | GE -syntax cvtop = - | EXTEND sx - | WRAP +syntax cvtop__(numtype_1, numtype_2) +syntax cvtop__(Inn_1, Inn_2) = + | EXTEND sx -- if $sizenn1(Inn_1) < $sizenn2(Inn_2) + | WRAP -- if $sizenn1(Inn_1) > $sizenn2(Inn_2) +syntax cvtop__(Inn_1, Fnn_2) = | CONVERT sx + | REINTERPRET -- if $sizenn1(Inn_1) = $sizenn2(Fnn_2) +syntax cvtop__(Fnn_1, Inn_2) = | TRUNC sx | TRUNC_SAT sx - | PROMOTE - | DEMOTE - | REINTERPRET + | REINTERPRET -- if $sizenn1(Fnn_1) = $sizenn2(Inn_2) +syntax cvtop__(Fnn_1, Fnn_2) = + | PROMOTE -- if $sizenn1(Fnn_1) < $sizenn2(Fnn_2) + | DEMOTE -- if $sizenn1(Fnn_1) > $sizenn2(Fnn_2) ;; Vector operators syntax dim hint(desc "dimension") = `1 | `2 | `4 | `8 | `16 syntax shape hint(desc "shape") = lanetype X dim hint(show %0#X#%2) -syntax ishape hint(desc "shape") = Jnn X dim hint(show %0#X#%2) -syntax fshape hint(desc "shape") = Fnn X dim hint(show %0#X#%2) -syntax pshape hint(desc "shape") = Pnn X dim hint(show %0#X#%2) + -- if $($lsize(lanetype) * dim = 128) +syntax ishape hint(desc "shape") = shape hint(show %0#X#%2) + -- if $lanetype(shape) = Jnn +syntax fshape hint(desc "shape") = shape hint(show %0#X#%2) + -- if $lanetype(shape) = Fnn +syntax pshape hint(desc "shape") = shape hint(show %0#X#%2) + -- if $lanetype(shape) = Pnn syntax M = dim @@ -367,18 +385,37 @@ syntax vrelop_(Fnn X M) = EQ | NE | LT | GT | LE | GE syntax half hint(desc "lane part") = LOW | HIGH syntax zero = ZERO -syntax vcvtop = EXTEND half sx | TRUNC_SAT sx zero? | CONVERT half? sx | DEMOTE zero | PROMOTE LOW +syntax vcvtop__(shape_1, shape_2) hint(macro "%" "V%") +syntax vcvtop__(Jnn_1 X M_1, Jnn_2 X M_2) = + | EXTEND half sx hint(show EXTEND#_#%#_#%) + -- if $lsizenn2(Jnn_2) = $(2 * $lsizenn1(Jnn_1)) +syntax vcvtop__(Jnn_1 X M_1, Fnn_2 X M_2) = + | CONVERT half? sx hint(show CONVERT#_#%) hint(show CONVERT#_#%#_#%) + -- if $sizenn2(Fnn_2) = $lsizenn1(Jnn_1) = `32 /\ half? = eps + \/ $sizenn2(Fnn_2) = $(2 * $lsizenn1(Jnn_1)) /\ half? = LOW +syntax vcvtop__(Fnn_1 X M_1, Inn_2 X M_2) = + | TRUNC_SAT sx zero? hint(show TRUNC_SAT#_#%) hint(show TRUNC_SAT#_#%#_#%) + -- if $sizenn1(Fnn_1) = $lsizenn2(Inn_2) = `32 /\ zero? = eps + \/ $sizenn1(Fnn_1) = $(2 * $lsizenn2(Inn_2)) /\ zero? = ZERO +syntax vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2) = + | DEMOTE zero hint(show DEMOTE#_#ZERO) + -- if $sizenn1(Fnn_1) = $(2 * $sizenn2(Fnn_2)) + | PROMOTE LOW hint(show PROMOTE#_#LOW) + -- if $(2 * $sizenn1(Fnn_1)) = $sizenn2(Fnn_2) syntax vshiftop_(ishape) syntax vshiftop_(Jnn X M) = SHL | SHR sx -syntax vextunop_(ishape) -syntax vextunop_(Jnn X M) = - | EXTADD_PAIRWISE sx -- if `16 <= $lsizenn(Jnn) <= `32 -syntax vextbinop_(ishape) -syntax vextbinop_(Jnn X M) = - | EXTMUL half sx hint(show EXTMUL#_#%#_#%) - | DOT S -- if $lsizenn(Jnn) = `32 +syntax vextunop__(ishape_1, ishape_2) hint(macro "%" "V%") +syntax vextunop__(Jnn_1 X M_1, Jnn_2 X M_2) = + | EXTADD_PAIRWISE sx hint(show EXTADD_PAIRWISE#_#%) + -- if 16 <= $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) <= `32 +syntax vextbinop__(ishape_1, ishape_2) hint(macro "%" "V%") +syntax vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2) = + | EXTMUL half sx hint(show EXTMUL#_#%#_#%) + -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) >= `16 + | DOT S hint(show DOT#_#%) + -- if $(2 * $lsizenn1(Jnn_1)) = $lsizenn2(Jnn_2) = `32 ;; Memory operators @@ -390,10 +427,10 @@ var ao : memarg syntax loadop_(numtype) syntax loadop_(Inn) = sz _ sx hint(show %0#_#%2) -- if sz < $sizenn(Inn) -syntax vloadop = - | SHAPE nat X nat _ sx hint(show %1#X#%3#_#%5) - | SPLAT nat hint(show %#_#SPLAT) - | ZERO nat hint(show %#_#ZERO) +syntax vloadop_(vectype) = + | SHAPE sz X M _ sx hint(show %1#X#%3#_#%5) -- if $(sz * M = $vsize(vectype)/2) /\ M > `1 + | SPLAT sz hint(show %#_#SPLAT) + | ZERO sz hint(show %#_#ZERO) -- if sz >= `32 ;; @@ -437,7 +474,7 @@ syntax instr/num hint(desc "numeric instruction") = ... | BINOP numtype binop_(numtype) hint(show %.%) | TESTOP numtype testop_(numtype) hint(show %.%) | RELOP numtype relop_(numtype) hint(show %.%) - | CVTOP numtype_1 numtype_2 cvtop hint(show %1.%3#_#%2) + | CVTOP numtype_1 numtype_2 cvtop__(numtype_2, numtype_1) hint(show %1.##%3#_#%2) -- if numtype_1 =/= numtype_2 | ... @@ -459,17 +496,13 @@ syntax instr/vec hint(desc "vector instruction") = ... -- if ishape = I8 X `16 /\ |laneidx*| = 16 | VSPLAT shape hint(show %.SPLAT) | VEXTRACT_LANE shape sx? laneidx hint(show %.EXTRACT_LANE_#% %) - -- if sx? =/= eps <=> $lanetype(shape) =/= $unpack($lanetype(shape)) + -- if $lanetype(shape) <- I32 I64 F32 F64 <=> sx? = eps | VREPLACE_LANE shape laneidx hint(show %.REPLACE_LANE %) - | VEXTUNOP ishape_1 ishape_2 vextunop_(ishape_1) - hint(show %1.%3#_#%2#_#%4) - -- if $($lsize($lanetype(ishape_1)) = 2*$lsize($lanetype(ishape_2))) - | VEXTBINOP ishape_1 ishape_2 vextbinop_(ishape_1) - hint(show %1.%3#_#%2#_#%4) - -- if $($lsize($lanetype(ishape_1)) = 2*$lsize($lanetype(ishape_2))) + | VEXTUNOP ishape_1 ishape_2 vextunop__(ishape_2, ishape_1) hint(show %1.%3#_#%2#_#%4) + | VEXTBINOP ishape_1 ishape_2 vextbinop__(ishape_2, ishape_1) hint(show %1.%3#_#%2#_#%4) | VNARROW ishape_1 ishape_2 sx hint(show %.NARROW#_#%#_#%) -- if $($lsize($lanetype(ishape_2)) = 2*$lsize($lanetype(ishape_1)) <= 32) - | VCVTOP shape shape vcvtop + | VCVTOP shape_1 shape_2 vcvtop__(shape_2, shape_1) hint(show %1.%3#_#%2) ;; TODO: missing constraints | ... @@ -509,7 +542,7 @@ syntax instr/memory hint(desc "memory instruction") = ... | LOAD numtype loadop_(numtype)? memarg hint(show %.LOAD %) hint(show %.LOAD# ##% %) | STORE numtype sz? memarg hint(show %.STORE %) hint(show %.STORE#% %) -- (if numtype = Inn /\ sz < $sizenn(Inn))? - | VLOAD vectype vloadop? memarg hint(show %.LOAD %) hint(show %.LOAD#% %) + | VLOAD vectype vloadop_(vectype)? memarg hint(show %.LOAD %) hint(show %.LOAD#% %) | VLOAD_LANE vectype sz memarg laneidx hint(show %.LOAD#%#_#LANE % %) | VSTORE vectype memarg hint(show %.STORE %) | VSTORE_LANE vectype sz memarg laneidx hint(show %.STORE#%#_#LANE % %) diff --git a/specification/wasm-2.0/3-numerics.spectec b/specification/wasm-2.0/3-numerics.spectec index 4960e5d274..8934ee1517 100644 --- a/specification/wasm-2.0/3-numerics.spectec +++ b/specification/wasm-2.0/3-numerics.spectec @@ -49,7 +49,7 @@ def $testop_(numtype, testop_(numtype), num_(numtype)) : num_(I32) hint(show %2#$_(%1)#((%3))) def $relop_(numtype, relop_(numtype), num_(numtype), num_(numtype)) : num_(I32) hint(show %2#$_(%1)#(%3, %4)) -def $cvtop__(numtype_1, numtype_2, cvtop, num_(numtype_1)) : num_(numtype_2)* +def $cvtop__(numtype_1, numtype_2, cvtop__(numtype_1, numtype_2), num_(numtype_1)) : num_(numtype_2)* hint(show %3#$__(%1,%2)#((%4))) def $wrap__(N, N', iN(N)) : iN(N') @@ -113,8 +113,8 @@ def $iand_(N, iN(N), iN(N)) : iN(N) def $iandnot_(N, iN(N), iN(N)) : iN(N) def $ior_(N, iN(N), iN(N)) : iN(N) def $ixor_(N, iN(N), iN(N)) : iN(N) -def $ishl_(N, iN(N), u32) : iN(N) -def $ishr_(N, sx, iN(N), u32) : iN(N) hint(show $ishr_(%)^(%)#((%,%))) +def $ishl_(N, iN(N), iN(N)) : iN(N) +def $ishr_(N, sx, iN(N), iN(N)) : iN(N) hint(show $ishr_(%)^(%)#((%,%))) def $irotl_(N, iN(N), iN(N)) : iN(N) def $irotr_(N, iN(N), iN(N)) : iN(N) def $iclz_(N, iN(N)) : iN(N) @@ -322,12 +322,14 @@ def $cvtop__(Fnn_1, Inn_2, REINTERPRET, fN_1) = $reinterpret__(Fnn_1, Inn_2, fN_ def $packnum_(lanetype, num_($unpack(lanetype))) : lane_(lanetype) hint(show $pack_(%,%)) -def $packnum_(numtype, c) = c +def $packnum_(Inn, c) = c +def $packnum_(Fnn, c) = c def $packnum_(packtype, c) = $wrap__($size($unpack(packtype)), $psize(packtype), c) def $unpacknum_(lanetype, lane_(lanetype)) : num_($unpack(lanetype)) hint(show $unpack_(%,%)) -def $unpacknum_(numtype, c) = c +def $unpacknum_(Inn, c) = c +def $unpacknum_(Fnn, c) = c def $unpacknum_(packtype, c) = $extend__($psize(packtype), $size($unpack(packtype)), U, c) @@ -340,19 +342,19 @@ def $inv_lanes_(shape, lane_($lanetype(shape))*) : vec_(V128) hint(show $lanes^(-1)#_%#(%,%)) def $inv_lanes_ hint(builtin) -def $zeroop(vcvtop) : zero? -def $zeroop(EXTEND half sx) = eps -def $zeroop(CONVERT half? sx) = eps -def $zeroop(TRUNC_SAT sx zero?) = zero? -def $zeroop(DEMOTE zero) = zero -def $zeroop(PROMOTE LOW) = eps +def $zeroop(shape_1, shape_2, vcvtop__(shape_1, shape_2)) : zero? +def $zeroop(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx) = eps +def $zeroop(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx) = eps +def $zeroop(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?) = zero? +def $zeroop(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE zero) = zero +def $zeroop(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW) = eps -def $halfop(vcvtop) : half? -def $halfop(EXTEND half sx) = half -def $halfop(CONVERT half? sx) = half? -def $halfop(TRUNC_SAT sx zero?) = eps -def $halfop(DEMOTE zero) = eps -def $halfop(PROMOTE LOW) = LOW +def $halfop(shape_1, shape_2, vcvtop__(shape_1, shape_2)) : half? +def $halfop(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx) = half +def $halfop(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx) = half? +def $halfop(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?) = eps +def $halfop(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE zero) = eps +def $halfop(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW) = LOW def $half(half, nat, nat) : nat def $half(LOW, i, j) = i @@ -380,7 +382,9 @@ def $vbinop_(shape, vbinop_(shape), vec_(V128), vec_(V128)) : vec_(V128)* hint(show %2#$_(%1)#(%3, %4)) def $vrelop_(shape, vrelop_(shape), vec_(V128), vec_(V128)) : vec_(V128) hint(show %2#$_(%1)#(%3, %4)) -def $vcvtop__(shape_1, shape_2, vcvtop, lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* +def $lcvtop__(shape_1, shape_2, vcvtop__(shape_1, shape_2), lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* + hint(show %3#$__(%1,%2)^(%4)#((%5))) +def $vcvtop__(shape_1, shape_2, vcvtop__(shape_1, shape_2), vec_(V128)) : vec_(V128) hint(show %3#$__(%1,%2)^(%4)#((%5))) def $vunop_(Jnn X M, ABS, v128_1) = v128 @@ -568,45 +572,61 @@ def $vrelop_(Fnn X M, GE, v128_1, v128_2) = v128 -- if $isize(Inn) = $size(Fnn) -- if v128 = $inv_lanes_(Inn X M, lane_3*) -def $vcvtop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx, iN_1) = iN_2 +def $lcvtop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx, iN_1) = iN_2 -- if iN_2 = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, iN_1) -def $vcvtop__(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx, iN_1) = fN_2 +def $lcvtop__(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx, iN_1) = fN_2 -- if fN_2 = $convert__($lsizenn1(Jnn_1), $lsizenn2(Fnn_2), sx, iN_1) -def $vcvtop__(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?, fN_1) = $list_(lane_(Inn_2), iN_2?) +def $lcvtop__(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?, fN_1) = $list_(lane_(Inn_2), iN_2?) -- if iN_2? = $trunc_sat__($lsizenn1(Fnn_1), $lsizenn2(Inn_2), sx, fN_1) -def $vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE ZERO, fN_1) = fN_2* +def $lcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE ZERO, fN_1) = fN_2* -- if fN_2* = $demote__($lsizenn1(Fnn_1), $lsizenn2(Fnn_2), fN_1) -def $vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW, fN_1) = fN_2* +def $lcvtop__(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW, fN_1) = fN_2* -- if fN_2* = $promote__($lsizenn1(Fnn_1), $lsizenn2(Fnn_2), fN_1) - -def $vextunop__(ishape_1, ishape_2, vextunop_(ishape_1), vec_(V128)) : vec_(V128) +def $vcvtop__(Lnn_1 X M, Lnn_2 X M, vcvtop, v128_1) = v128 + -- if $halfop(Lnn_1 X M, Lnn_2 X M, vcvtop) = eps /\ $zeroop(Lnn_1 X M, Lnn_2 X M, vcvtop) = eps + -- if c_1* = $lanes_(Lnn_1 X M, v128_1) + -- if c** = $setproduct_(lane_(Lnn_2), $lcvtop__(Lnn_1 X M, Lnn_2 X M, vcvtop, c_1)*) + -- if v128 <- $inv_lanes_(Lnn_2 X M, c*)* +def $vcvtop__(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop, v128_1) = v128 + -- if $halfop(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop) = half + -- if c_1* = $lanes_(Lnn_1 X M_1, v128_1)[$half(half, 0, M_2) : M_2] + -- if c** = $setproduct_(lane_(Lnn_2), $lcvtop__(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop, c_1)*) + -- if v128 <- $inv_lanes_(Lnn_2 X M_2, c*)* +def $vcvtop__(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop, v128_1) = v128 + -- if $zeroop(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop) = ZERO + -- if c_1* = $lanes_(Lnn_1 X M_1, v128_1) + -- if c** = $setproduct_(lane_(Lnn_2), ($lcvtop__(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop, c_1)* ++ [$packnum_(Lnn_2, $zero($unpack(Lnn_2)))]^M_1)) + -- if v128 <- $inv_lanes_(Lnn_2 X M_2, c*)* + + +def $vextunop__(ishape_1, ishape_2, vextunop__(ishape_1, ishape_2), vec_(V128)) : vec_(V128) hint(show %3#$_((%1,%2))^(%5)#((%6))) -def $vextbinop__(ishape_1, ishape_2, vextbinop_(ishape_1), vec_(V128), vec_(V128)) : vec_(V128) +def $vextbinop__(ishape_1, ishape_2, vextbinop__(ishape_1, ishape_2), vec_(V128), vec_(V128)) : vec_(V128) hint(show %3#$_((%1,%2))^(%5)#((%6,%7))) -def $vextunop__(Inn_1 X M_1, Inn_2 X M_2, EXTADD_PAIRWISE sx, c_1) = c - -- var cj_1 : iN($lsize(Inn_1)) - -- var cj_2 : iN($lsize(Inn_1)) - -- if ci* = $lanes_(Inn_2 X M_2, c_1) - -- if $concat_(iN($lsizenn1(Inn_1)), (cj_1 cj_2)*) = $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), sx, ci)* - -- if c = $inv_lanes_(Inn_1 X M_1, $iadd_($lsizenn1(Inn_1), cj_1, cj_2)*) - -def $vextbinop__(Inn_1 X M_1, Inn_2 X M_2, EXTMUL half sx, c_1, c_2) = c - -- if ci_1* = $lanes_(Inn_2 X M_2, c_1)[$half(half, 0, M_1) : M_1] - -- if ci_2* = $lanes_(Inn_2 X M_2, c_2)[$half(half, 0, M_1) : M_1] - -- if c = $inv_lanes_(Inn_1 X M_1, $imul_($lsizenn1(Inn_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), sx, ci_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), sx, ci_2))*) - -def $vextbinop__(Inn_1 X M_1, Inn_2 X M_2, DOT S, c_1, c_2) = c - -- var cj_1 : iN($lsize(Inn_1)) - -- var cj_2 : iN($lsize(Inn_1)) - -- if ci_1* = $lanes_(Inn_2 X M_2, c_1) - -- if ci_2* = $lanes_(Inn_2 X M_2, c_2) - -- if $concat_(iN($lsizenn1(Inn_1)), (cj_1 cj_2)*) = $imul_($lsizenn1(Inn_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), S, ci_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), S, ci_2))* - -- if c = $inv_lanes_(Inn_1 X M_1, $iadd_($lsizenn1(Inn_1), cj_1, cj_2)*) +def $vextunop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTADD_PAIRWISE sx, c_1) = c + -- var cj_1 : iN($lsize(Jnn_2)) + -- var cj_2 : iN($lsize(Jnn_2)) + -- if ci* = $lanes_(Jnn_1 X M_1, c_1) + -- if $concat_(iN($lsizenn1(Jnn_2)), (cj_1 cj_2)*) = $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci)* + -- if c = $inv_lanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*) + +def $vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2, EXTMUL half sx, c_1, c_2) = c + -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1)[$half(half, 0, M_2) : M_2] + -- if ci_2* = $lanes_(Jnn_1 X M_1, c_2)[$half(half, 0, M_2) : M_2] + -- if c = $inv_lanes_(Jnn_2 X M_2, $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci_2))*) + +def $vextbinop__(Jnn_1 X M_1, Jnn_2 X M_2, DOT S, c_1, c_2) = c + -- var cj_1 : iN($lsize(Jnn_2)) + -- var cj_2 : iN($lsize(Jnn_2)) + -- if ci_1* = $lanes_(Jnn_1 X M_1, c_1) + -- if ci_2* = $lanes_(Jnn_1 X M_1, c_2) + -- if $concat_(iN($lsizenn2(Jnn_2)), (cj_1 cj_2)*) = $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2))* + -- if c = $inv_lanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*) def $vshiftop_(ishape, vshiftop_(ishape), lane_($lanetype(ishape)), u32) : lane_($lanetype(ishape)) hint(show %2#_%1#(%3, %4)) -def $vshiftop_(Jnn X M, SHL, lane, n) = $ishl_($lsizenn(Jnn), lane, n) -def $vshiftop_(Jnn X M, SHR sx, lane, n) = $ishr_($lsizenn(Jnn), sx, lane, n) +def $vshiftop_(Jnn X M, SHL, lane, n) = $ishl_($lsizenn(Jnn), lane, $(n \ $lsizenn(Jnn))) +def $vshiftop_(Jnn X M, SHR sx, lane, n) = $ishr_($lsizenn(Jnn), sx, lane, $(n \ $lsizenn(Jnn))) diff --git a/specification/wasm-2.0/5-runtime-aux.spectec b/specification/wasm-2.0/5-runtime-aux.spectec index d652b1019d..28e72d528f 100644 --- a/specification/wasm-2.0/5-runtime-aux.spectec +++ b/specification/wasm-2.0/5-runtime-aux.spectec @@ -4,7 +4,7 @@ ;; Default values -def $default_(valtype) : val +def $default_(valtype) : val hint(partial) def $default_(I32) = (CONST I32 0) def $default_(I64) = (CONST I64 0) diff --git a/specification/wasm-2.0/6-typing.spectec b/specification/wasm-2.0/6-typing.spectec index e49a37987c..7058444cdc 100644 --- a/specification/wasm-2.0/6-typing.spectec +++ b/specification/wasm-2.0/6-typing.spectec @@ -101,7 +101,6 @@ rule Limits_sub/eps: |- `[n_1 .. eps] <: `[n_2 .. eps] -- if n_1 >= n_2 - rule Functype_sub: |- ft <: ft @@ -276,13 +275,7 @@ rule Instr_ok/testop: rule Instr_ok/relop: C |- RELOP nt relop_nt : nt nt -> I32 - -;; TODO: move side conditions to syntax -rule Instr_ok/cvtop-reinterpret: - C |- CVTOP nt_1 nt_2 REINTERPRET : nt_2 -> nt_1 - -- if $size(nt_1) = $size(nt_2) - -rule Instr_ok/cvtop-convert: +rule Instr_ok/cvtop: C |- CVTOP nt_1 nt_2 cvtop : nt_2 -> nt_1 @@ -593,7 +586,7 @@ rule Func_ok: C |- FUNC x (LOCAL t)* expr : t_1* -> t_2* -- if C.TYPES[x] = t_1* -> t_2* -- (if t =/= BOT)* - -- Expr_ok: C ++ {LOCALS t_1* t*, LABELS (t_2*), RETURN (t_2*)} |- expr : t_2* + -- Expr_ok: {LOCALS t_1* t*, LABELS (t_2*), RETURN (t_2*)} ++ C |- expr : t_2* rule Global_ok: C |- GLOBAL gt expr : gt diff --git a/specification/wasm-2.0/8-reduction.spectec b/specification/wasm-2.0/8-reduction.spectec index 19ec11340a..5e4d91acc2 100644 --- a/specification/wasm-2.0/8-reduction.spectec +++ b/specification/wasm-2.0/8-reduction.spectec @@ -90,10 +90,10 @@ rule Step_pure/label-vals: ;; TODO: may want a label context instead of bubbling up rule Step_pure/br-zero: - (LABEL_ n `{instr'*} val'* val^n (BR 0) instr*) ~> val^n instr'* + (LABEL_ n `{instr'*} val'* val^n (BR 0) admininstr*) ~> val^n instr'* rule Step_pure/br-succ: - (LABEL_ n `{instr'*} val* (BR $(l+1)) instr*) ~> val* (BR l) + (LABEL_ n `{instr'*} val* (BR $(l+1)) admininstr*) ~> val* (BR l) rule Step_pure/br_if-true: @@ -139,17 +139,17 @@ rule Step_pure/frame-vals: (FRAME_ n `{f} val^n) ~> val^n rule Step_pure/return-frame: - (FRAME_ n `{f} val'* val^n RETURN instr*) ~> val^n + (FRAME_ n `{f} val'* val^n RETURN admininstr*) ~> val^n rule Step_pure/return-label: - (LABEL_ n `{instr'*} val* RETURN instr*) ~> val* RETURN + (LABEL_ n `{instr'*} val* RETURN admininstr*) ~> val* RETURN ;; Traps rule Step_pure/trap-vals: - val* TRAP instr* ~> TRAP - -- if val* =/= eps \/ instr* =/= eps + val* TRAP admininstr* ~> TRAP + -- if val* =/= eps \/ admininstr* =/= eps rule Step_pure/trap-label: (LABEL_ n `{instr'*} TRAP) ~> TRAP @@ -323,7 +323,7 @@ rule Step_pure/vsplat: rule Step_pure/vextract_lane-num: (VCONST V128 c_1) (VEXTRACT_LANE (nt X N) i) ~> (CONST nt c_2) - -- if c_2 = $lanes_(nt X N, c_1)[i] + -- if c_2 = $unpacknum_(nt, $lanes_(nt X N, c_1)[i]) ;; TODO : fshape rule Step_pure/vextract_lane-pack: @@ -337,12 +337,12 @@ rule Step_pure/vreplace_lane: rule Step_pure/vextunop: - (VCONST V128 c_1) (VEXTUNOP sh_1 sh_2 vextunop) ~> (VCONST V128 c) + (VCONST V128 c_1) (VEXTUNOP sh_2 sh_1 vextunop) ~> (VCONST V128 c) -- if $vextunop__(sh_1, sh_2, vextunop, c_1) = c rule Step_pure/vextbinop: - (VCONST V128 c_1) (VCONST V128 c_2) (VEXTBINOP sh_1 sh_2 vextbinop) ~> (VCONST V128 c) + (VCONST V128 c_1) (VCONST V128 c_2) (VEXTBINOP sh_2 sh_1 vextbinop) ~> (VCONST V128 c) -- if $vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c @@ -355,26 +355,9 @@ rule Step_pure/vnarrow: -- if c = $inv_lanes_(Jnn_2 X N_2, cj_1* cj_2*) -rule Step_pure/vcvtop-full: - (VCONST V128 c_1) (VCVTOP (Lnn_2 X M) (Lnn_1 X M) vcvtop) ~> (VCONST V128 c) - -- if $halfop(vcvtop) = eps /\ $zeroop(vcvtop) = eps - -- if ci* = $lanes_(Lnn_1 X M, c_1) - -- if cj** = $setproduct_(lane_(Lnn_2), $vcvtop__(Lnn_1 X M, Lnn_2 X M, vcvtop, ci)*) - -- if c <- $inv_lanes_(Lnn_2 X M, cj*)* - -rule Step_pure/vcvtop-half: - (VCONST V128 c_1) (VCVTOP (Lnn_2 X M_2) (Lnn_1 X M_1) vcvtop) ~> (VCONST V128 c) - -- if $halfop(vcvtop) = half - -- if ci* = $lanes_(Lnn_1 X M_1, c_1)[$half(half, 0, M_2) : M_2] - -- if cj** = $setproduct_(lane_(Lnn_2), $vcvtop__(Lnn_1 X M_1, Lnn_2 X M_2, vcvtop, ci)*) - -- if c <- $inv_lanes_(Lnn_2 X M_2, cj*)* - -rule Step_pure/vcvtop-zero: - (VCONST V128 c_1) (VCVTOP (nt_2 X M_2) (nt_1 X M_1) vcvtop) ~> (VCONST V128 c) - -- if $zeroop(vcvtop) = ZERO - -- if ci* = $lanes_(nt_1 X M_1, c_1) - -- if cj** = $setproduct_(lane_(nt_2), ($vcvtop__(nt_1 X M_1, nt_2 X M_2, vcvtop, ci)* ++ [$zero(nt_2)]^M_1)) - -- if c <- $inv_lanes_(nt_2 X M_2, cj*)* +rule Step_pure/vcvtop: + (VCONST V128 c_1) (VCVTOP sh_2 sh_1 vcvtop) ~> (VCONST V128 c) + -- if c = $vcvtop__(sh_1, sh_2, vcvtop, c_1) ;; Local instructions @@ -622,7 +605,7 @@ rule Step_read/memory.fill-zero: rule Step_read/memory.fill-succ: z; (CONST I32 i) val (CONST I32 n) (MEMORY.FILL) ~> (CONST I32 i) val (STORE I32 8 $memarg0) - (CONST I32 $(i+1)) val (CONST I32 $(n-1)) (MEMORY.FILL) + (CONST I32 $iadd_(32, i, 1)) val (CONST I32 $(n-1)) (MEMORY.FILL) -- otherwise @@ -638,7 +621,7 @@ rule Step_read/memory.copy-zero: rule Step_read/memory.copy-le: z; (CONST I32 j) (CONST I32 i) (CONST I32 n) (MEMORY.COPY) ~> (CONST I32 j) (CONST I32 i) (LOAD I32 (8 _ U) $memarg0) (STORE I32 8 $memarg0) - (CONST I32 $(j+1)) (CONST I32 $(i+1)) (CONST I32 $(n-1)) (MEMORY.COPY) + (CONST I32 $iadd_(32, j, 1)) (CONST I32 $iadd_(32, i, 1)) (CONST I32 $(n-1)) (MEMORY.COPY) -- otherwise -- if j <= i @@ -661,7 +644,7 @@ rule Step_read/memory.init-zero: rule Step_read/memory.init-succ: z; (CONST I32 j) (CONST I32 i) (CONST I32 n) (MEMORY.INIT x) ~> (CONST I32 j) (CONST I32 $data(z,x).BYTES[i]) (STORE I32 8 $memarg0) - (CONST I32 $(j+1)) (CONST I32 $(i+1)) (CONST I32 $(n-1)) (MEMORY.INIT x) + (CONST I32 $iadd_(32, j, 1)) (CONST I32 $iadd_(32, i, 1)) (CONST I32 $(n-1)) (MEMORY.INIT x) -- otherwise diff --git a/specification/wasm-2.0/9-module.spectec b/specification/wasm-2.0/9-module.spectec index f05cf7e177..8aaac79425 100644 --- a/specification/wasm-2.0/9-module.spectec +++ b/specification/wasm-2.0/9-module.spectec @@ -187,7 +187,7 @@ def $runelem(ELEM reftype expr* (ACTIVE x instr*), i) = instr* (CONST I32 0) (CONST I32 n) (TABLE.INIT x i) (ELEM.DROP i) -- if n = |expr*| -def $rundata(data, idx) : instr* +def $rundata(data, idx) : instr* hint(partial) def $rundata(DATA byte* (PASSIVE), i) = eps def $rundata(DATA byte* (ACTIVE 0 instr*), i) = instr* (CONST I32 0) (CONST I32 n) (MEMORY.INIT i) (DATA.DROP i) diff --git a/specification/wasm-2.0/B-soundness.spectec b/specification/wasm-2.0/B-soundness.spectec new file mode 100644 index 0000000000..83a43b1ddb --- /dev/null +++ b/specification/wasm-2.0/B-soundness.spectec @@ -0,0 +1,294 @@ +;; Contexts + +relation Context_ok: |- context : OK hint(macro "%context") + +rule Context_ok: + |- C : OK + -- if C = + { TYPES ft*, + FUNCS ft_2*, + GLOBALS gt*, + MEMS mt*, + TABLES tt*, + LOCALS lct*, + DATAS ok*, + ELEMS et*, + LABELS rt*, + RETURN rt'?, + } + -- (Functype_ok: |- ft : OK)* + -- (Globaltype_ok: |- gt : OK)* + -- (Memtype_ok: |- mt : OK)* + -- (Tabletype_ok: |- tt : OK)* + -- (Functype_ok: |- ft_2 : OK)* + + +;; Reference types + +relation Ref_ok: store |- ref : reftype + +rule Ref_ok/null: + s |- REF.NULL rt : rt + +rule Ref_ok/func: + s |- REF.FUNC_ADDR a : FUNCREF + -- Externaddr_ok: s |- FUNC a : FUNC ext + +rule Ref_ok/extern: + s |- REF.HOST_ADDR a : EXTERNREF + + +;; Value types + +relation Val_ok: store |- val : valtype + +rule Val_ok/numtype: + s |- CONST nt c_t : nt + +rule Val_ok/vectype: + s |- VCONST vt c_t : vt + +rule Val_ok/reftype: + s |- r : rt + -- Ref_ok : s |- r : rt + + +;; Result types + +relation Result_ok: store |- result : valtype* + +rule Result_ok/result: + s |- _VALS v* : t* + -- (Val_ok: s |- v : t)* + +rule Result_ok/trap: + s |- TRAP : t* + + +;; Administrative instructions + +syntax adminexpr = admininstr* + +relation Instr_ok2: store; context |- admininstr : functype + hint(prose "%3 is valid with %4") +relation Instrs_ok2: store; context |- admininstr* : functype + hint(prose "%3 is valid with %4") +relation Expr_ok2: store; context |- adminexpr : resulttype + hint(prose "%3 is valid with %4") + +rule Instr_ok2/plain: + s; C |- instr : t_1* -> t_2* + -- Instr_ok: C |- instr : t_1* -> t_2* + +rule Instr_ok2/label: + s; C |- LABEL_ n `{instr'*} admininstr* : eps -> t* + -- Instrs_ok2: s; C |- instr'* : t'^n -> t* + -- Instrs_ok2: s; {LABELS (t')^n} ++ C |- admininstr* : eps -> t* + +rule Instr_ok2/frame: + s; C |- FRAME_ n `{f} admininstr* : eps -> t^n + -- Frame_ok: s |- f : C' + -- Expr_ok2: s; {RETURN t^n} ++ C' |- admininstr* : t^n + +rule Instr_ok2/call_addr: + s; C |- CALL_ADDR funcaddr : t_1* -> t_2* + -- Externaddr_ok: s |- FUNC funcaddr: FUNC (t_1* -> t_2*) + +rule Instr_ok2/ref: + s; C |- ref : eps -> rt + -- Ref_ok: s |- ref : rt + +rule Instr_ok2/trap: + s; C |- TRAP : t_1* -> t_2* + + +rule Instrs_ok2/empty: + s; C |- eps : eps -> eps + +rule Instrs_ok2/instr: + s; C |- admininstr : t_1* -> t_2* + -- Instr_ok2: s; C |- admininstr : t_1* -> t_2* + +rule Instrs_ok2/seq: + s; C |- admininstr_1* admininstr_2* : t_1* -> t_3* + -- Instrs_ok2: s; C |- admininstr_1* : t_1* -> t_2* + -- Instrs_ok2: s; C |- admininstr_2* : t_2* -> t_3* + +rule Instrs_ok2/sub: + s; C |- admininstr* : t'_1* -> t'_2* + -- Instrs_ok2: s; C |- admininstr* : t_1* -> t_2* + -- Resulttype_sub: |- t'_1* <: t_1* + -- Resulttype_sub: |- t_2* <: t'_2* + +rule Instrs_ok2/frame: + s; C |- admininstr* : t* t_1* -> t* t_2* + -- Instrs_ok2: s; C |- admininstr* : t_1* -> t_2* + +rule Expr_ok2: + s; C |- admininstr* : t* + -- Instrs_ok2: s; C |- admininstr* : eps -> t* + + +;; Instances + +relation Globalinst_ok: store |- globalinst : globaltype +relation Meminst_ok: store |- meminst : memtype +relation Tableinst_ok: store |- tableinst : tabletype +relation Funcinst_ok: store |- funcinst : functype +relation Datainst_ok: store |- datainst : datatype +relation Eleminst_ok: store |- eleminst : elemtype +relation Exportinst_ok: store |- exportinst : OK + +rule Globalinst_ok: + s |- {TYPE mut t, VALUE val} : mut t + -- Globaltype_ok: |- mut t : OK + -- Val_ok: s |- val : t + +rule Meminst_ok: + s |- {TYPE `[n..m?] PAGE, BYTES b*} : `[n..m?] PAGE + -- Memtype_ok: |- `[n..m?] PAGE : OK + -- if |b*| = $(n * $($(64 * $Ki))) + +rule Tableinst_ok: + s |- {TYPE `[n..m?] rt , REFS ref*} : `[n..m?] rt + -- Tabletype_ok: |- `[n..m?] rt : OK + -- (Ref_ok : s |- ref : rt)* + -- if |ref*| = n + +rule Funcinst_ok: + s |- {TYPE ft, MODULE moduleinst, CODE func} : ft + -- Functype_ok: |- ft : OK + -- Moduleinst_ok: s |- moduleinst : C + -- Func_ok: C |- func : ft + +rule Datainst_ok: + s |- {BYTES b*} : OK + -- if |b*| < $(2^32) + +rule Eleminst_ok: + s |- {TYPE rt, REFS ref*} : rt + -- (Ref_ok: s |- ref : rt)* + -- if |ref*| < $(2^32) + +rule Exportinst_ok: + s |- {NAME nm, ADDR xa} : OK + -- Externaddr_ok: s |- xa : xt + + +;; Modules + +relation Moduleinst_ok: store |- moduleinst : context + +rule Moduleinst_ok: + s |- { TYPES functype*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* } : + { TYPES functype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS functype_F*, + DATAS datatype*, + ELEMS elemtype*, + } + -- (Functype_ok: |- functype : OK)* + -- (Externaddr_ok: s |- GLOBAL globaladdr : GLOBAL globaltype)* + -- (Externaddr_ok: s |- FUNC funcaddr : FUNC functype_F)* + -- (Externaddr_ok: s |- MEM memaddr : MEM memtype)* + -- (Externaddr_ok: s |- TABLE tableaddr : TABLE tabletype)* + -- (Exportinst_ok: s |- exportinst : OK)* + ---- + -- (Datainst_ok: s |- s.DATAS[dataaddr] : datatype)* + -- (Eleminst_ok: s |- s.ELEMS[elemaddr] : elemtype)* + ---- + -- if $disjoint_(name, (exportinst.NAME)*) + -- (if exportinst.ADDR <- (GLOBAL globaladdr)* (MEM memaddr)* (TABLE tableaddr)* (FUNC funcaddr)*)* + + +;; Stores + +relation Store_ok: |- store : OK + +rule Store_ok: + |- s : OK + -- (Globalinst_ok: s |- globalinst : globaltype)* + -- (Meminst_ok: s |- meminst : memtype)* + -- (Tableinst_ok: s |- tableinst : tabletype)* + -- (Funcinst_ok: s |- funcinst : functype)* + -- (Datainst_ok: s |- datainst : datatype)* + -- (Eleminst_ok: s |- eleminst : elemtype)* + ---- + -- if s = {GLOBALS globalinst*, MEMS meminst*, TABLES tableinst*, + FUNCS funcinst*, DATAS datainst*, ELEMS eleminst*} + + +;; Store extension + +relation Extend_globalinst: globalinst `<= globalinst +relation Extend_meminst: meminst `<= meminst +relation Extend_tableinst: tableinst `<= tableinst +relation Extend_funcinst: funcinst `<= funcinst +relation Extend_datainst: datainst `<= datainst +relation Extend_eleminst: eleminst `<= eleminst +relation Extend_store: store `<= store + +rule Extend_globalinst: + {TYPE mut t, VALUE val} `<= {TYPE mut t, VALUE val'} + -- if mut = MUT \/ val = val' + +rule Extend_meminst: + {TYPE `[n..m?] PAGE, BYTES b*} `<= {TYPE `[n'..m?] PAGE, BYTES b'*} + -- if n <= n' + -- if |b*| <= |b'*| + +rule Extend_tableinst: + {TYPE `[n..m?] rt, REFS ref*} `<= {TYPE `[n'..m?] rt, REFS ref'*} + -- if n <= n' + -- if |ref*| <= |ref'*| + +rule Extend_funcinst: + {TYPE ft, MODULE mm, CODE fc} `<= {TYPE ft, MODULE mm, CODE fc} + +rule Extend_datainst: + {BYTES b*} `<= {BYTES b'*} + -- if b* = b'* \/ b'* = eps + +rule Extend_eleminst: + {TYPE rt, REFS ref*} `<= {TYPE rt, REFS ref'*} + -- if ref* = ref'* \/ ref'* = eps + +rule Extend_store: + s `<= s' + -- (Extend_globalinst: s.GLOBALS[a] `<= s'.GLOBALS[a] )^(a<|s.GLOBALS|) + -- (Extend_meminst: s.MEMS[a] `<= s'.MEMS[a] )^(a<|s.MEMS|) + -- (Extend_tableinst: s.TABLES[a] `<= s'.TABLES[a] )^(a<|s.TABLES|) + -- (Extend_funcinst: s.FUNCS[a] `<= s'.FUNCS[a] )^(a<|s.FUNCS|) + -- (Extend_datainst: s.DATAS[a] `<= s'.DATAS[a] )^(a<|s.DATAS|) + -- (Extend_eleminst: s.ELEMS[a] `<= s'.ELEMS[a] )^(a<|s.ELEMS|) + + +;; Configurations + +relation Frame_ok: store |- frame : context +relation State_ok: |- state : context +relation Config_ok: |- config : resulttype + +rule Frame_ok: + s |- {LOCALS val*, MODULE moduleinst} : {LOCALS t*} ++ C + -- Moduleinst_ok: s |- moduleinst : C + -- (Val_ok: s |- val : t)* + +rule State_ok: + |- s; f : C + -- Store_ok: |- s : OK + -- Frame_ok: s |- f : C + +rule Config_ok: + |- s; f; admininstr* : t* + -- State_ok: |- s; f : C + -- Expr_ok2: s; C |- admininstr* : t* diff --git a/specification/wasm-3.0/0.3-aux.seq.spectec b/specification/wasm-3.0/0.3-aux.seq.spectec index 7b6439ef97..6e1ae7d888 100644 --- a/specification/wasm-3.0/0.3-aux.seq.spectec +++ b/specification/wasm-3.0/0.3-aux.seq.spectec @@ -4,7 +4,7 @@ ;; Type casting -def $opt_(syntax X, X*) : X? hint(show %2) +def $opt_(syntax X, X*) : X? hint(show %2) hint(partial) def $opt_(syntax X, eps) = eps def $opt_(syntax X, w) = w diff --git a/specification/wasm-3.0/1.1-syntax.values.spectec b/specification/wasm-3.0/1.1-syntax.values.spectec index 670a329c90..dca0f903e1 100644 --- a/specification/wasm-3.0/1.1-syntax.values.spectec +++ b/specification/wasm-3.0/1.1-syntax.values.spectec @@ -29,11 +29,11 @@ var b : byte ;; Floating-point -def $signif(N) : nat +def $signif(N) : nat hint(partial) def $signif(32) = 23 def $signif(64) = 52 -def $expon(N) : nat +def $expon(N) : nat hint(partial) def $expon(32) = 8 def $expon(64) = 11 diff --git a/specification/wasm-3.0/1.2-syntax.types.spectec b/specification/wasm-3.0/1.2-syntax.types.spectec index 682d15f6b0..49fbcb3556 100644 --- a/specification/wasm-3.0/1.2-syntax.types.spectec +++ b/specification/wasm-3.0/1.2-syntax.types.spectec @@ -52,9 +52,9 @@ syntax valtype/sem = | ... | BOT -syntax Inn hint(show I#N) hint(macro "nt%") = I32 | I64 +syntax Inn hint(show I#N) hint(macro "nt%") = addrtype syntax Fnn hint(show F#N) hint(macro "nt%") = F32 | F64 -syntax Vnn hint(show V#N) hint(macro "nt%") = V128 +syntax Vnn hint(show V#N) hint(macro "nt%") = vectype syntax Cnn hint(show t) = Inn | Fnn | Vnn @@ -94,7 +94,7 @@ syntax storagetype hint(desc "storage type") = valtype | packtype syntax Pnn hint(show I#N) hint(macro "nt%") = packtype syntax Jnn hint(show I#N) hint(macro "nt%") = Inn | Pnn -syntax Lnn hint(show I#N) hint(macro "nt%") = Inn | Fnn | Pnn +syntax Lnn hint(show I#N) hint(macro "nt%") = lanetype ;; Result types @@ -176,15 +176,15 @@ var tu : typeuse ;; Computed types -def $IN(N) : Inn hint(show I#%) hint(macro "INX") +def $IN(N) : Inn hint(show I#%) hint(macro "INX") hint(partial) def $IN(32) = I32 def $IN(64) = I64 -def $FN(N) : Fnn hint(show F#%) hint(macro "FNX") +def $FN(N) : Fnn hint(show F#%) hint(macro "FNX") hint(partial) def $FN(32) = F32 def $FN(64) = F64 -def $JN(N) : Jnn hint(show I#%) hint(macro "INX") +def $JN(N) : Jnn hint(show I#%) hint(macro "INX") hint(partial) def $JN(8) = I8 def $JN(16) = I16 def $JN(32) = I32 @@ -197,7 +197,7 @@ def $size(numtype) : nat hint(show |%|) def $vsize(vectype) : nat hint(show |%|) def $psize(packtype) : nat hint(show |%|) def $lsize(lanetype) : nat hint(show |%|) -def $zsize(storagetype) : nat hint(show |%|) +def $zsize(storagetype) : nat hint(show |%|) hint(partial) def $isize(Inn) : nat hint(show |%|) hint(inverse $inv_isize) def $jsize(Jnn) : nat hint(show |%|) hint(inverse $inv_jsize) def $fsize(Fnn) : nat hint(show |%|) hint(inverse $inv_fsize) @@ -233,7 +233,7 @@ def $inv_fsize(32) = F32 def $inv_fsize(64) = F64 def $inv_jsize(8) = I8 def $inv_jsize(16) = I16 -def $inv_jsize(n) = $inv_isize(n) +def $inv_jsize(n) = $inv_isize(n) ;; TODO(2, rossberg): get rid of these terrible hacks by defining $Inn(nat) hint(show I#%) def $sizenn(numtype) : nat hint(show N) hint(macro none) ;; HACK! @@ -260,7 +260,7 @@ def $jsizenn(Jnn) : nat hint(show N) hint(macro none) hint(inverse $inv_jsizen def $jsizenn(Jnn) = $lsize(Jnn) def $inv_jsizenn(nat) : Jnn hint(partial) -def $inv_jsizenn(n) = $inv_jsize(n) +def $inv_jsizenn(n) = $inv_jsize(n) ;; Unpacking @@ -297,7 +297,7 @@ def $diffrt((REF null_1? ht_1), (REF NULL ht_2)) = (REF ht_1) def $diffrt((REF null_1? ht_1), (REF ht_2)) = (REF null_1? ht_1) ;; TODO(3, rossberg): Could this be inferable as a narrowing coercion? -def $as_deftype(typeuse) : deftype hint(show %) +def $as_deftype(typeuse) : deftype hint(show %) hint(partial) def $as_deftype(dt) = dt @@ -334,7 +334,7 @@ def $funcsxt(externtype xt*) = $funcsxt(xt*) -- otherwise ;; Substitution -def $subst_typevar(typevar, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") +def $subst_typevar(typevar, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") hint(partial) def $subst_typeuse(typeuse, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") def $subst_addrtype(addrtype, typevar*, typeuse*) : addrtype hint(show %#`[%:=%]) hint(macro "%subst") @@ -398,7 +398,7 @@ def $subst_comptype((FUNC t_1* -> t_2*), tv*, tu*) = FUNC $subst_valtype(t_1, tv def $subst_subtype((SUB final? tu'* ct), tv*, tu*) = SUB final? $subst_typeuse(tu', tv*, tu*)* $subst_comptype(ct, tv*, tu*) -def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) hint(partial) def $minus_recs(eps, eps) = (eps, eps) def $minus_recs((REC n) tv*, tu_1 tu*) = $minus_recs(tv*, tu*) def $minus_recs((_IDX x) tv*, tu_1 tu*) = ((_IDX x) tv'*, tu_1 tu'*) diff --git a/specification/wasm-3.0/1.3-syntax.instructions.spectec b/specification/wasm-3.0/1.3-syntax.instructions.spectec index 356c930915..2a29f01eb2 100644 --- a/specification/wasm-3.0/1.3-syntax.instructions.spectec +++ b/specification/wasm-3.0/1.3-syntax.instructions.spectec @@ -10,10 +10,16 @@ syntax num_(Fnn) = fN($sizenn(Fnn)) syntax pack_(Pnn) = iN($psizenn(Pnn)) +;; TODO: HACK! lane_ should reuse num_ and pack_. +;; Original definition: +;; syntax lane_(lanetype) +;; syntax lane_(numtype) = num_(numtype) +;; syntax lane_(packtype) = pack_(packtype) +;; syntax lane_(Jnn) = iN($lsizenn(Jnn)) ;; HACK + syntax lane_(lanetype) -syntax lane_(numtype) = num_(numtype) -syntax lane_(packtype) = pack_(packtype) -syntax lane_(Jnn) = iN($lsizenn(Jnn)) ;; HACK +syntax lane_(Jnn) = iN($lsizenn(Jnn)) +syntax lane_(Fnn) = fN($sizenn(Fnn)) syntax vec_(Vnn) = vN($vsizenn(Vnn)) @@ -171,13 +177,13 @@ syntax vcvtop__(Jnn_1 X M_1, Fnn_2 X M_2) = | CONVERT half? sx hint(show CONVERT#_#%) hint(show CONVERT#_#%#_#%) -- if $sizenn2(Fnn_2) = $lsizenn1(Jnn_1) = `32 /\ half? = eps \/ $sizenn2(Fnn_2) = $(2 * $lsizenn1(Jnn_1)) /\ half? = LOW -syntax vcvtop__(Fnn_1 X M_1, Jnn_2 X M_2) = +syntax vcvtop__(Fnn_1 X M_1, Inn_2 X M_2) = | TRUNC_SAT sx zero? hint(show TRUNC_SAT#_#%) hint(show TRUNC_SAT#_#%#_#%) - -- if $sizenn1(Fnn_1) = $lsizenn2(Jnn_2) = `32 /\ zero? = eps - \/ $sizenn1(Fnn_1) = $(2 * $lsizenn2(Jnn_2)) /\ zero? = ZERO + -- if $sizenn1(Fnn_1) = $lsizenn2(Inn_2) = `32 /\ zero? = eps + \/ $sizenn1(Fnn_1) = $(2 * $lsizenn2(Inn_2)) /\ zero? = ZERO | RELAXED_TRUNC sx zero? hint(show RELAXED_TRUNC#_#%) hint(show RELAXED_TRUNC#_#%#_#%) - -- if $sizenn1(Fnn_1) = $lsizenn2(Jnn_2) = `32 /\ zero? = eps - \/ $sizenn1(Fnn_1) = $(2 * $lsizenn2(Jnn_2)) /\ zero? = ZERO + -- if $sizenn1(Fnn_1) = $lsizenn2(Inn_2) = `32 /\ zero? = eps + \/ $sizenn1(Fnn_1) = $(2 * $lsizenn2(Inn_2)) /\ zero? = ZERO syntax vcvtop__(Fnn_1 X M_1, Fnn_2 X M_2) = | DEMOTE zero hint(show DEMOTE#_#ZERO) -- if $sizenn1(Fnn_1) = $(2 * $sizenn2(Fnn_2)) @@ -198,7 +204,7 @@ syntax storeop_(numtype) syntax storeop_(Inn) = sz -- if sz < $sizenn(Inn) syntax vloadop_(vectype) hint(macro "%" "L%") = - | SHAPE sz X M _ sx hint(show %1#X#%3#_#%5) hint(macro "%shape") -- if $(sz * M = $vsize(vectype)/2) + | SHAPE sz X M _ sx hint(show %1#X#%3#_#%5) hint(macro "%shape") -- if $(sz * M = $vsize(vectype)/2) /\ M > `1 | SPLAT sz hint(show %#_#SPLAT) | ZERO sz hint(show %#_#ZERO) -- if sz >= `32 diff --git a/specification/wasm-3.0/2.0-validation.contexts.spectec b/specification/wasm-3.0/2.0-validation.contexts.spectec index ab3b7d714e..fb7e55a4e5 100644 --- a/specification/wasm-3.0/2.0-validation.contexts.spectec +++ b/specification/wasm-3.0/2.0-validation.contexts.spectec @@ -46,7 +46,7 @@ var C : context ;; Context update ;; TODO(3, rossberg): is there a way to show this as %[.LOCAL[%]* = %*] ? -def $with_locals(context, localidx*, localtype*) : context hint(show %[.LOCAL[%]=%]) hint(prose "%1 with the local types of %2 updated to %3") +def $with_locals(context, localidx*, localtype*) : context hint(show %[.LOCAL[%]=%]) hint(prose "%1 with the local types of %2 updated to %3") hint(partial) def $with_locals(C, eps, eps) = C def $with_locals(C, x_1 x*, lct_1 lct*) = $with_locals(C[.LOCALS[x_1] = lct_1], x*, lct*) diff --git a/specification/wasm-3.0/3.1-numerics.scalar.spectec b/specification/wasm-3.0/3.1-numerics.scalar.spectec index 3c66c4625e..d695feafd1 100644 --- a/specification/wasm-3.0/3.1-numerics.scalar.spectec +++ b/specification/wasm-3.0/3.1-numerics.scalar.spectec @@ -340,7 +340,8 @@ def $lpacknum_(lanetype, num_($lunpack(lanetype))) : lane_(lanetype) def $cpacknum_(storagetype, lit_($cunpack(storagetype))) : lit_(storagetype) hint(show $pack_(%,%)) hint(macro "packnum") -def $lpacknum_(numtype, c) = c +def $lpacknum_(Inn, c) = c +def $lpacknum_(Fnn, c) = c def $lpacknum_(packtype, c) = $wrap__($size($lunpack(packtype)), $psize(packtype), c) def $cpacknum_(consttype, c) = c @@ -352,7 +353,8 @@ def $lunpacknum_(lanetype, lane_(lanetype)) : num_($lunpack(lanetype)) def $cunpacknum_(storagetype, lit_(storagetype)) : lit_($cunpack(storagetype)) hint(show $unpack_(%,%)) hint(macro "unpacknum") -def $lunpacknum_(numtype, c) = c +def $lunpacknum_(Inn, c) = c +def $lunpacknum_(Fnn, c) = c def $lunpacknum_(packtype, c) = $extend__($psize(packtype), $size($lunpack(packtype)), U, c) def $cunpacknum_(consttype, c) = c diff --git a/specification/wasm-3.0/3.2-numerics.vector.spectec b/specification/wasm-3.0/3.2-numerics.vector.spectec index 451369fc10..56d717ddc4 100644 --- a/specification/wasm-3.0/3.2-numerics.vector.spectec +++ b/specification/wasm-3.0/3.2-numerics.vector.spectec @@ -19,16 +19,16 @@ def $inv_lanes_ hint(builtin) def $zeroop(shape_1, shape_2, vcvtop__(shape_1, shape_2)) : zero? def $zeroop(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx) = eps def $zeroop(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx) = eps -def $zeroop(Fnn_1 X M_1, Jnn_2 X M_2, TRUNC_SAT sx zero?) = zero? -def $zeroop(Fnn_1 X M_1, Jnn_2 X M_2, RELAXED_TRUNC sx zero?) = zero? +def $zeroop(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?) = zero? +def $zeroop(Fnn_1 X M_1, Inn_2 X M_2, RELAXED_TRUNC sx zero?) = zero? def $zeroop(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE zero) = zero def $zeroop(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW) = eps def $halfop(shape_1, shape_2, vcvtop__(shape_1, shape_2)) : half? def $halfop(Jnn_1 X M_1, Jnn_2 X M_2, EXTEND half sx) = half def $halfop(Jnn_1 X M_1, Fnn_2 X M_2, CONVERT half? sx) = half? -def $halfop(Fnn_1 X M_1, Jnn_2 X M_2, TRUNC_SAT sx zero?) = eps -def $halfop(Fnn_1 X M_1, Jnn_2 X M_2, RELAXED_TRUNC sx zero?) = eps +def $halfop(Fnn_1 X M_1, Inn_2 X M_2, TRUNC_SAT sx zero?) = eps +def $halfop(Fnn_1 X M_1, Inn_2 X M_2, RELAXED_TRUNC sx zero?) = eps def $halfop(Fnn_1 X M_1, Fnn_2 X M_2, DEMOTE zero) = eps def $halfop(Fnn_1 X M_1, Fnn_2 X M_2, PROMOTE LOW) = LOW @@ -51,11 +51,11 @@ def $irelaxed_swizzle_lane_(N, c*, i) = $relaxed2($R_swizzle, iN(N), 0, c*[i \ | ;; Lanewise operations -def $ivunop_(shape, def $f_(N, iN(N)) : iN(N), vec_(V128)) : vec_(V128)* +def $ivunop_(shape, def $f_(N, iN(N)) : iN(N), vec_(V128)) : vec_(V128)* hint(partial) def $fvunop_(shape, def $f_(N, fN(N)) : fN(N)*, vec_(V128)) : vec_(V128)* -def $ivbinop_(shape, def $f_(N, iN(N), iN(N)) : iN(N), vec_(V128), vec_(V128)) : vec_(V128)* -def $ivbinopsx_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N), sx, vec_(V128), vec_(V128)) : vec_(V128)* +def $ivbinop_(shape, def $f_(N, iN(N), iN(N)) : iN(N), vec_(V128), vec_(V128)) : vec_(V128)* hint(partial) +def $ivbinopsx_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N), sx, vec_(V128), vec_(V128)) : vec_(V128)* hint(partial) def $ivbinopsxnd_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N)*, sx, vec_(V128), vec_(V128)) : vec_(V128)* def $fvbinop_(shape, def $f_(N, fN(N), fN(N)) : fN(N)*, vec_(V128), vec_(V128)) : vec_(V128)* @@ -66,12 +66,12 @@ def $ivrelop_(shape, def $f_(N, iN(N), iN(N)) : u32, vec_(V128), vec_(V128)) : v def $ivrelopsx_(shape, def $f_(N, sx, iN(N), iN(N)) : u32, sx, vec_(V128), vec_(V128)) : vec_(V128) def $fvrelop_(shape, def $f_(N, fN(N), fN(N)) : u32, vec_(V128), vec_(V128)) : vec_(V128) -def $ivshiftop_(shape, def $f_(N, iN(N), iN(N)) : iN(N), vec_(V128), u32) : vec_(V128) -def $ivshiftopsx_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N), sx, vec_(V128), u32) : vec_(V128) +def $ivshiftop_(shape, def $f_(N, iN(N), iN(N)) : iN(N), vec_(V128), u32) : vec_(V128) hint(partial) +def $ivshiftopsx_(shape, def $f_(N, sx, iN(N), iN(N)) : iN(N), sx, vec_(V128), u32) : vec_(V128) hint(partial) def $ivbitmaskop_(shape, vec_(V128)) : u32 -def $ivswizzlop_(shape, def $f_(N, iN(N)*, iN(N)) : iN(N), vec_(V128), vec_(V128)) : vec_(V128) -def $ivshufflop_(shape, laneidx*, vec_(V128), vec_(V128)) : vec_(V128) +def $ivswizzlop_(shape, def $f_(N, iN(N)*, iN(N)) : iN(N), vec_(V128), vec_(V128)) : vec_(V128) hint(partial) +def $ivshufflop_(shape, laneidx*, vec_(V128), vec_(V128)) : vec_(V128) hint(partial) def $ivunop_(Jnn X M, def $f_, v_1) = $inv_lanes_(Jnn X M, c*) @@ -189,7 +189,7 @@ def $vbitmaskop_(ishape, vec_(V128)) : u32 hint(show VBITMASK#$_(%1,%2)) def $vswizzlop_(bshape, vswizzlop_(bshape), vec_(V128), vec_(V128)) : vec_(V128) hint(show %2#$_(%1,%3,%4)) -def $vshufflop_(bshape, laneidx*, vec_(V128), vec_(V128)) : vec_(V128) +def $vshufflop_(bshape, laneidx*, vec_(V128), vec_(V128)) : vec_(V128) hint(partial) hint(show VSHUFFLE#$_(%1,%2,%3,%4)) def $vnarrowop__(shape_1, shape_2, sx, vec_(V128), vec_(V128)) : vec_(V128) diff --git a/specification/wasm-3.0/4.0-execution.configurations.spectec b/specification/wasm-3.0/4.0-execution.configurations.spectec index 321d7a9257..84c1356024 100644 --- a/specification/wasm-3.0/4.0-execution.configurations.spectec +++ b/specification/wasm-3.0/4.0-execution.configurations.spectec @@ -175,8 +175,8 @@ def $Ki = 1024 ;; Packed fields -def $packfield_(storagetype, val) : fieldval hint(show $pack_(%,%)) hint(macro "packfield") -def $unpackfield_(storagetype, sx?, fieldval) : val hint(show $unpack_(%)^(%)#((%))) hint(macro "unpackfield") +def $packfield_(storagetype, val) : fieldval hint(show $pack_(%,%)) hint(macro "packfield") hint(partial) +def $unpackfield_(storagetype, sx?, fieldval) : val hint(show $unpack_(%)^(%)#((%))) hint(macro "unpackfield") hint(partial) def $packfield_(valtype, val) = val def $packfield_(packtype, CONST I32 i) = PACK packtype $wrap__(32, $psize(packtype), i) diff --git a/specification/wasm-3.0/4.1-execution.values.spectec b/specification/wasm-3.0/4.1-execution.values.spectec index 060abbaaae..9fc3c8fb65 100644 --- a/specification/wasm-3.0/4.1-execution.values.spectec +++ b/specification/wasm-3.0/4.1-execution.values.spectec @@ -4,7 +4,7 @@ ;; Default values -def $default_(valtype) : val? +def $default_(valtype) : val? hint(partial) def $default_(Inn) = (CONST Inn 0) def $default_(Fnn) = (CONST Fnn $fzero($size(Fnn))) def $default_(Vnn) = (VCONST Vnn 0) diff --git a/specification/wasm-3.0/4.3-execution.instructions.spectec b/specification/wasm-3.0/4.3-execution.instructions.spectec index 949f6b44e9..ac69f528ca 100644 --- a/specification/wasm-3.0/4.3-execution.instructions.spectec +++ b/specification/wasm-3.0/4.3-execution.instructions.spectec @@ -582,7 +582,7 @@ rule Step_read/memory.fill-zero: rule Step_read/memory.fill-succ: z; (CONST at i) val (CONST at n) (MEMORY.FILL x) ~> (CONST at i) val (STORE I32 `8 x $memarg0) - (CONST at $(i+1)) val (CONST at $(n-1)) (MEMORY.FILL x) + (CONST at $iadd_($size(at), i, 1)) val (CONST at $(n-1)) (MEMORY.FILL x) -- otherwise @@ -599,7 +599,7 @@ rule Step_read/memory.copy-zero: rule Step_read/memory.copy-le: z; (CONST at_1 i_1) (CONST at_2 i_2) (CONST at' n) (MEMORY.COPY x_1 x_2) ~> (CONST at_1 i_1) (CONST at_2 i_2) (LOAD I32 (`8 _ U) x_2 $memarg0) (STORE I32 `8 x_1 $memarg0) - (CONST at_1 $(i_1 + 1)) (CONST at_2 $(i_2 + 1)) (CONST at' $(n - 1)) (MEMORY.COPY x_1 x_2) + (CONST at_1 $iadd_($size(at_1), i_1, 1)) (CONST at_2 $iadd_($size(at_2), i_2, 1)) (CONST at' $(n - 1)) (MEMORY.COPY x_1 x_2) -- otherwise -- if i_1 <= i_2 @@ -623,7 +623,7 @@ rule Step_read/memory.init-zero: rule Step_read/memory.init-succ: z; (CONST at i) (CONST I32 j) (CONST I32 n) (MEMORY.INIT x y) ~> (CONST at i) (CONST I32 $data(z,y).BYTES[j]) (STORE I32 `8 x $memarg0) - (CONST at $(i+1)) (CONST I32 $(j+1)) (CONST I32 $(n-1)) (MEMORY.INIT x y) + (CONST at $iadd_($size(at), i, 1)) (CONST I32 $iadd_(32, j, 1)) (CONST I32 $(n-1)) (MEMORY.INIT x y) -- otherwise @@ -1071,7 +1071,7 @@ rule Step_pure/vsplat: rule Step_pure/vextract_lane-num: (VCONST V128 c_1) (VEXTRACT_LANE (nt X M) i) ~> (CONST nt c_2) - -- if c_2 = $lanes_(nt X M, c_1)[i] + -- if c_2 = $lunpacknum_(nt, $lanes_(nt X M, c_1)[i]) rule Step_pure/vextract_lane-pack: (VCONST V128 c_1) (VEXTRACT_LANE (pt X M) sx i) ~> (CONST I32 c_2) diff --git a/specification/wasm-3.0/7.1-soundness.configurations.spectec b/specification/wasm-3.0/7.1-soundness.configurations.spectec index c6d2bddf19..2316acbc23 100644 --- a/specification/wasm-3.0/7.1-soundness.configurations.spectec +++ b/specification/wasm-3.0/7.1-soundness.configurations.spectec @@ -37,8 +37,7 @@ rule Instr_ok2/label: rule Instr_ok2/frame: s; C |- FRAME_ n `{f} instr* : eps -> t^n -- Frame_ok: s |- f : C' - -- if C'.RETURN = t^n - -- Expr_ok2: s; C' |- instr* : t^n + -- Expr_ok2: s; {RETURN t^n} ++ C' |- instr* : t^n -- Resulttype_ok: {} |- t^n : OK rule Instr_ok2/handler: @@ -126,11 +125,13 @@ rule Funcinst_ok: rule Datainst_ok: s |- {BYTES b*} : OK + -- if |b*| < $(2^32) rule Eleminst_ok: s |- {TYPE rt, REFS ref*} : rt -- Reftype_ok: {} |- rt : OK -- (Ref_ok: s |- ref : rt)* + -- if |ref*| < $(2^32) rule Exportinst_ok: s |- {NAME nm, ADDR xa} : OK diff --git a/specification/wasm-latest/0.3-aux.seq.spectec b/specification/wasm-latest/0.3-aux.seq.spectec index 7b6439ef97..6e1ae7d888 100644 --- a/specification/wasm-latest/0.3-aux.seq.spectec +++ b/specification/wasm-latest/0.3-aux.seq.spectec @@ -4,7 +4,7 @@ ;; Type casting -def $opt_(syntax X, X*) : X? hint(show %2) +def $opt_(syntax X, X*) : X? hint(show %2) hint(partial) def $opt_(syntax X, eps) = eps def $opt_(syntax X, w) = w diff --git a/specification/wasm-latest/1.1-syntax.values.spectec b/specification/wasm-latest/1.1-syntax.values.spectec index 670a329c90..dca0f903e1 100644 --- a/specification/wasm-latest/1.1-syntax.values.spectec +++ b/specification/wasm-latest/1.1-syntax.values.spectec @@ -29,11 +29,11 @@ var b : byte ;; Floating-point -def $signif(N) : nat +def $signif(N) : nat hint(partial) def $signif(32) = 23 def $signif(64) = 52 -def $expon(N) : nat +def $expon(N) : nat hint(partial) def $expon(32) = 8 def $expon(64) = 11 diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index 682d15f6b0..49fbcb3556 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -52,9 +52,9 @@ syntax valtype/sem = | ... | BOT -syntax Inn hint(show I#N) hint(macro "nt%") = I32 | I64 +syntax Inn hint(show I#N) hint(macro "nt%") = addrtype syntax Fnn hint(show F#N) hint(macro "nt%") = F32 | F64 -syntax Vnn hint(show V#N) hint(macro "nt%") = V128 +syntax Vnn hint(show V#N) hint(macro "nt%") = vectype syntax Cnn hint(show t) = Inn | Fnn | Vnn @@ -94,7 +94,7 @@ syntax storagetype hint(desc "storage type") = valtype | packtype syntax Pnn hint(show I#N) hint(macro "nt%") = packtype syntax Jnn hint(show I#N) hint(macro "nt%") = Inn | Pnn -syntax Lnn hint(show I#N) hint(macro "nt%") = Inn | Fnn | Pnn +syntax Lnn hint(show I#N) hint(macro "nt%") = lanetype ;; Result types @@ -176,15 +176,15 @@ var tu : typeuse ;; Computed types -def $IN(N) : Inn hint(show I#%) hint(macro "INX") +def $IN(N) : Inn hint(show I#%) hint(macro "INX") hint(partial) def $IN(32) = I32 def $IN(64) = I64 -def $FN(N) : Fnn hint(show F#%) hint(macro "FNX") +def $FN(N) : Fnn hint(show F#%) hint(macro "FNX") hint(partial) def $FN(32) = F32 def $FN(64) = F64 -def $JN(N) : Jnn hint(show I#%) hint(macro "INX") +def $JN(N) : Jnn hint(show I#%) hint(macro "INX") hint(partial) def $JN(8) = I8 def $JN(16) = I16 def $JN(32) = I32 @@ -197,7 +197,7 @@ def $size(numtype) : nat hint(show |%|) def $vsize(vectype) : nat hint(show |%|) def $psize(packtype) : nat hint(show |%|) def $lsize(lanetype) : nat hint(show |%|) -def $zsize(storagetype) : nat hint(show |%|) +def $zsize(storagetype) : nat hint(show |%|) hint(partial) def $isize(Inn) : nat hint(show |%|) hint(inverse $inv_isize) def $jsize(Jnn) : nat hint(show |%|) hint(inverse $inv_jsize) def $fsize(Fnn) : nat hint(show |%|) hint(inverse $inv_fsize) @@ -233,7 +233,7 @@ def $inv_fsize(32) = F32 def $inv_fsize(64) = F64 def $inv_jsize(8) = I8 def $inv_jsize(16) = I16 -def $inv_jsize(n) = $inv_isize(n) +def $inv_jsize(n) = $inv_isize(n) ;; TODO(2, rossberg): get rid of these terrible hacks by defining $Inn(nat) hint(show I#%) def $sizenn(numtype) : nat hint(show N) hint(macro none) ;; HACK! @@ -260,7 +260,7 @@ def $jsizenn(Jnn) : nat hint(show N) hint(macro none) hint(inverse $inv_jsizen def $jsizenn(Jnn) = $lsize(Jnn) def $inv_jsizenn(nat) : Jnn hint(partial) -def $inv_jsizenn(n) = $inv_jsize(n) +def $inv_jsizenn(n) = $inv_jsize(n) ;; Unpacking @@ -297,7 +297,7 @@ def $diffrt((REF null_1? ht_1), (REF NULL ht_2)) = (REF ht_1) def $diffrt((REF null_1? ht_1), (REF ht_2)) = (REF null_1? ht_1) ;; TODO(3, rossberg): Could this be inferable as a narrowing coercion? -def $as_deftype(typeuse) : deftype hint(show %) +def $as_deftype(typeuse) : deftype hint(show %) hint(partial) def $as_deftype(dt) = dt @@ -334,7 +334,7 @@ def $funcsxt(externtype xt*) = $funcsxt(xt*) -- otherwise ;; Substitution -def $subst_typevar(typevar, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") +def $subst_typevar(typevar, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") hint(partial) def $subst_typeuse(typeuse, typevar*, typeuse*) : typeuse hint(show %#`[%:=%]) hint(macro "%subst") def $subst_addrtype(addrtype, typevar*, typeuse*) : addrtype hint(show %#`[%:=%]) hint(macro "%subst") @@ -398,7 +398,7 @@ def $subst_comptype((FUNC t_1* -> t_2*), tv*, tu*) = FUNC $subst_valtype(t_1, tv def $subst_subtype((SUB final? tu'* ct), tv*, tu*) = SUB final? $subst_typeuse(tu', tv*, tu*)* $subst_comptype(ct, tv*, tu*) -def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) hint(partial) def $minus_recs(eps, eps) = (eps, eps) def $minus_recs((REC n) tv*, tu_1 tu*) = $minus_recs(tv*, tu*) def $minus_recs((_IDX x) tv*, tu_1 tu*) = ((_IDX x) tv'*, tu_1 tu'*) diff --git a/specification/wasm-latest/2.0-validation.contexts.spectec b/specification/wasm-latest/2.0-validation.contexts.spectec index ab3b7d714e..fb7e55a4e5 100644 --- a/specification/wasm-latest/2.0-validation.contexts.spectec +++ b/specification/wasm-latest/2.0-validation.contexts.spectec @@ -46,7 +46,7 @@ var C : context ;; Context update ;; TODO(3, rossberg): is there a way to show this as %[.LOCAL[%]* = %*] ? -def $with_locals(context, localidx*, localtype*) : context hint(show %[.LOCAL[%]=%]) hint(prose "%1 with the local types of %2 updated to %3") +def $with_locals(context, localidx*, localtype*) : context hint(show %[.LOCAL[%]=%]) hint(prose "%1 with the local types of %2 updated to %3") hint(partial) def $with_locals(C, eps, eps) = C def $with_locals(C, x_1 x*, lct_1 lct*) = $with_locals(C[.LOCALS[x_1] = lct_1], x*, lct*) diff --git a/specification/wasm-latest/4.0-execution.configurations.spectec b/specification/wasm-latest/4.0-execution.configurations.spectec index 321d7a9257..84c1356024 100644 --- a/specification/wasm-latest/4.0-execution.configurations.spectec +++ b/specification/wasm-latest/4.0-execution.configurations.spectec @@ -175,8 +175,8 @@ def $Ki = 1024 ;; Packed fields -def $packfield_(storagetype, val) : fieldval hint(show $pack_(%,%)) hint(macro "packfield") -def $unpackfield_(storagetype, sx?, fieldval) : val hint(show $unpack_(%)^(%)#((%))) hint(macro "unpackfield") +def $packfield_(storagetype, val) : fieldval hint(show $pack_(%,%)) hint(macro "packfield") hint(partial) +def $unpackfield_(storagetype, sx?, fieldval) : val hint(show $unpack_(%)^(%)#((%))) hint(macro "unpackfield") hint(partial) def $packfield_(valtype, val) = val def $packfield_(packtype, CONST I32 i) = PACK packtype $wrap__(32, $psize(packtype), i) diff --git a/specification/wasm-latest/4.1-execution.values.spectec b/specification/wasm-latest/4.1-execution.values.spectec index 060abbaaae..9fc3c8fb65 100644 --- a/specification/wasm-latest/4.1-execution.values.spectec +++ b/specification/wasm-latest/4.1-execution.values.spectec @@ -4,7 +4,7 @@ ;; Default values -def $default_(valtype) : val? +def $default_(valtype) : val? hint(partial) def $default_(Inn) = (CONST Inn 0) def $default_(Fnn) = (CONST Fnn $fzero($size(Fnn))) def $default_(Vnn) = (VCONST Vnn 0) diff --git a/spectec/doc/example/output/NanoWasm.pdf b/spectec/doc/example/output/NanoWasm.pdf index 525ff3f867..d39752efc7 100644 Binary files a/spectec/doc/example/output/NanoWasm.pdf and b/spectec/doc/example/output/NanoWasm.pdf differ diff --git a/spectec/src/backend-ast/print.ml b/spectec/src/backend-ast/print.ml index b5e0535163..47a2e29103 100644 --- a/spectec/src/backend-ast/print.ml +++ b/spectec/src/backend-ast/print.ml @@ -126,6 +126,7 @@ and exp e = | CatE (e1, e2) -> Node ("cat", [exp e1; exp e2]) | CvtE (e1, nt1, nt2) -> Node ("cvt", [numtyp nt1; numtyp nt2; exp e1]) | SubE (e1, t1, t2) -> Node ("sub", [typ t1; typ t2; exp e1]) + | IfE (e1, e2, e3) -> Node ("if", [exp e1; exp e2; exp e3]) and expfield (at, e) = Node ("field", [mixop (Mixop.Atom at); exp e]) @@ -165,6 +166,7 @@ and prem pr = | LetPr (_qs, e1, e2) -> Node ("let", [exp e1; exp e2]) | ElsePr -> Atom "else" | IterPr (pr1, it) -> Node ("iter", [prem pr1] @ iterexp it) + | NegPr pr1 -> Node ("neg", [prem pr1]) (* Definitions *) diff --git a/spectec/src/backend-interpreter/ds.ml b/spectec/src/backend-interpreter/ds.ml index dd0737cecf..0be1493865 100644 --- a/spectec/src/backend-interpreter/ds.ml +++ b/spectec/src/backend-interpreter/ds.ml @@ -85,9 +85,7 @@ let lookup_env key env = try Env.find key env with Not_found -> let freeVar s = Exception.FreeVar s in - env - |> string_of_env - |> Printf.sprintf "The key '%s' is not in the map: %s.\n%!" key + Printf.sprintf "`%s` is a free variable" key |> freeVar |> raise diff --git a/spectec/src/backend-interpreter/ds.mli b/spectec/src/backend-interpreter/ds.mli index fae46fc49f..47bc38f167 100644 --- a/spectec/src/backend-interpreter/ds.mli +++ b/spectec/src/backend-interpreter/ds.mli @@ -7,6 +7,7 @@ val bound_func : string -> bool val lookup_algo : string -> algorithm type env = value Env.t +val string_of_env : env -> string val lookup_env : string -> env -> value val lookup_env_opt : string -> env -> value option diff --git a/spectec/src/backend-interpreter/interpreter.ml b/spectec/src/backend-interpreter/interpreter.ml index 8d2282f834..c13f222aaf 100644 --- a/spectec/src/backend-interpreter/interpreter.ml +++ b/spectec/src/backend-interpreter/interpreter.ml @@ -181,7 +181,7 @@ and check_type ty v expr = boolV (ty = "val") (* numtype *) | CaseV (nt, []) when List.mem nt inn_types -> - boolV (ty = "Inn" || ty = "Jnn" || ty = "numtype" || ty = "valtype" || ty = "consttype") + boolV (ty = "Inn" || ty = "Jnn" || ty = "numtype" || ty = "valtype" || ty = "consttype" || ty = "addrtype") | CaseV (nt, []) when List.mem nt fnn_types -> boolV (ty = "Fnn" || ty = "numtype" || ty = "valtype" || ty = "consttype") | CaseV (vt, []) when List.mem vt vnn_types -> @@ -376,10 +376,12 @@ and eval_expr env expr = else Array.make i v |> listV (* HARDCODE: The case where itered variable does not appear in xes. - --> Insert itered variable. This was instroduced due to the change of IrerE's ListN. *) - | IterE (e1, (ListN (e2, Some x), [])) -> + --> Insert itered variable. This was instroduced due to the change of IrerE's ListN. + TODO: Do this in the preprocess *) + | IterE (e1, (ListN (e2, Some x), xes)) + when List.for_all (fun (x', _) -> x <> x') xes -> let dummy_expr = VarE "_" $$ no_region % (Il.Ast.VarT ("_" $ no_region, []) $ no_region) in - let expr' = {expr with it = IterE (e1, (ListN (e2, Some x), [(x, dummy_expr)]))} in + let expr' = {expr with it = IterE (e1, (ListN (e2, Some x), [(x, dummy_expr)] @ xes))} in eval_expr env expr' | IterE (inner_e, (iter, xes)) -> let vs = @@ -431,9 +433,17 @@ and eval_expr env expr = check_type (string_of_typ t) v expr | MatchE (e1, e2) -> (* Deferred to reference interpreter *) - let rt1 = e1 |> eval_expr env |> Construct.al_to_reftype in - let rt2 = e2 |> eval_expr env |> Construct.al_to_reftype in - boolV (Match.match_reftype [] rt1 rt2) + let v1 = eval_expr env e1 in + let v2 = eval_expr env e2 in + let rt1 = Construct.al_to_reftype v1 in + let rt2 = Construct.al_to_reftype v2 in + begin try boolV (Match.match_reftype [] rt1 rt2) with + | _ -> fail_expr expr @@ + Printf.sprintf + "\nMatching the reftype\n\t%s\nwith the reftype\n\t%s\nusing the reference interpreter resulted in an unexpected error\n" + (Al.Print.string_of_value v1) + (Al.Print.string_of_value v2) + end | TopValueE _ -> (* TODO: type check *) boolV (List.length (WasmContext.get_value_stack ()) > 0) diff --git a/spectec/src/exe-spectec/main.ml b/spectec/src/exe-spectec/main.ml index 13f4ac05e3..246a5f9e1c 100644 --- a/spectec/src/exe-spectec/main.ml +++ b/spectec/src/exe-spectec/main.ml @@ -19,6 +19,16 @@ type pass = | Totalize | Unthe | Sideconditions + | TypeFamilyRemoval + | Else + | Undep + | SubExpansion + | Uncaseremoval + | AliasDemut + | ImproveIds + | Ite + | ElseSimp + | LetIntroMech (* This list declares the intended order of passes. @@ -26,8 +36,22 @@ Because passes have dependencies, and because some flags enable multiple passers (--all-passes, some targets), we do _not_ want to use the order of flags on the command line. *) -let _skip_passes = [ Sub; Unthe ] (* Not clear how to extend them to indexed types *) -let all_passes = [ Totalize; Sideconditions ] +let _skip_passes = [ Unthe ] (* Not clear how to extend them to indexed types *) +let all_passes = [ + Ite; + LetIntroMech; + TypeFamilyRemoval; + Undep; + Totalize; + Else; + ElseSimp; + Uncaseremoval; + Sideconditions; + SubExpansion; + Sub; + AliasDemut; + ImproveIds +] type file_kind = | Spec @@ -53,6 +77,7 @@ let print_el = ref false let print_elab_il = ref false let print_final_il = ref false let print_all_il = ref false +let print_all_il_to = ref "" let print_al = ref false let print_al_o = ref "" let print_no_pos = ref false @@ -65,6 +90,16 @@ let enable_pass pass = selected_passes := PS.add pass !selected_passes let print_il il = Printf.printf "%s\n%!" (Il.Print.string_of_script ~suppress_pos:(!print_no_pos) il) +let print_il_to pass_name pass_count il = + let pass_name = if pass_name = "" then "elab" else pass_name in + let pass_name = Printf.sprintf "%02d-%s" pass_count pass_name in + if !print_all_il_to <> "" then + let filename = Str.replace_first (Str.regexp "%s") pass_name !print_all_il_to in + Out_channel.with_open_text filename (fun oc -> + Out_channel.output_string oc (Il.Print.string_of_script ~suppress_pos:(!print_no_pos) il); + Out_channel.output_string oc "\n" + ) + (* Il pass metadata *) @@ -73,19 +108,49 @@ let pass_flag = function | Totalize -> "totalize" | Unthe -> "the-elimination" | Sideconditions -> "sideconditions" + | TypeFamilyRemoval -> "typefamily-removal" + | AliasDemut -> "alias-demut" + | Else -> "else" + | Undep -> "remove-indexed-types" + | SubExpansion -> "sub-expansion" + | Uncaseremoval -> "uncase-removal" + | ImproveIds -> "improve-ids" + | Ite -> "ite" + | ElseSimp -> "else-simplification" + | LetIntroMech -> "let-intro-mech" let pass_desc = function | Sub -> "Synthesize explicit subtype coercions" | Totalize -> "Run function totalization" | Unthe -> "Eliminate the ! operator in relations" | Sideconditions -> "Infer side conditions" + | TypeFamilyRemoval -> "Transform Type families into sum types" + | Else -> "Eliminate the otherwise premise in relations" + | Undep -> "Transform indexed types into types with well-formedness predicates" + | SubExpansion -> "Expands subtype matching" + | Uncaseremoval -> "Eliminate the uncase expression" + | AliasDemut -> "Lifts type aliases out of mutual groups" + | ImproveIds -> "Disambiguates ids used from each other" + | Ite -> "If-then-else introduction" + | ElseSimp -> "Simplifies generated otherwise relations (after else pass)" + | LetIntroMech -> "Let Premise introduction for mechanization backends" + let run_pass : pass -> Il.Ast.script -> Il.Ast.script = function | Sub -> Middlend.Sub.transform | Totalize -> Middlend.Totalize.transform | Unthe -> Middlend.Unthe.transform | Sideconditions -> Middlend.Sideconditions.transform - + | TypeFamilyRemoval -> Middlend.Typefamilyremoval.transform + | Else -> Middlend.Else.transform + | Undep -> Middlend.Undep.transform + | SubExpansion -> Middlend.Subexpansion.transform + | Uncaseremoval -> Middlend.Uncaseremoval.transform + | AliasDemut -> Middlend.AliasDemut.transform + | ImproveIds -> Middlend.Improveids.transform + | Ite -> Middlend.Ite.transform + | LetIntroMech -> Middlend.Letintromech.transform + | ElseSimp -> Middlend.Elsesimp.transform (* Argument parsing *) @@ -150,6 +215,7 @@ let argspec = Arg.align ( "--print-il", Arg.Set print_elab_il, " Print IL (after elaboration)"; "--print-final-il", Arg.Set print_final_il, " Print final IL"; "--print-all-il", Arg.Set print_all_il, " Print IL after each step"; + "--print-all-il-to", Arg.Set_string print_all_il_to, " Print IL after each step to file (with %s replaced by pass numer and name)"; "--print-al", Arg.Set print_al, " Print al"; "--print-al-o", Arg.Set_string print_al_o, " Print al with given name"; "--print-il-notes", Arg.Set Il.Print.print_notes, " Print IL with type annotations"; @@ -171,6 +237,7 @@ let log s = if !logging then Printf.printf "== %s\n%!" s let () = Printexc.record_backtrace true; let last_pass = ref "" in + let pass_count = ref 0 in try Arg.parse argspec add_arg usage; log "Parsing..."; @@ -180,6 +247,7 @@ let () = log "Elaboration..."; let il, elab_env = Frontend.Elab.elab el in if !print_elab_il || !print_all_il then print_il il; + print_il_to !last_pass !pass_count il; log "IL Validation..."; Il.Valid.valid il; @@ -196,9 +264,11 @@ let () = if not (PS.mem pass !selected_passes) then il else ( last_pass := pass_flag pass; + pass_count := !pass_count + 1; log ("Running pass " ^ pass_flag pass ^ "..."); let il = run_pass pass il in if !print_all_il then print_il il; + print_il_to !last_pass !pass_count il; log ("IL Validation after pass " ^ pass_flag pass ^ "..."); Il.Valid.valid il; il diff --git a/spectec/src/frontend/det.ml b/spectec/src/frontend/det.ml index 716fd30c19..d804548418 100644 --- a/spectec/src/frontend/det.ml +++ b/spectec/src/frontend/det.ml @@ -42,7 +42,7 @@ and det_exp e = ) @@ fun _ -> match e.it with | VarE x -> bound_varid x - | BoolE _ | NumE _ | TextE _ -> empty + | BoolE _ | NumE _ | TextE _ | IfE _ -> empty (* We consider arithmetic expressions determinate, * since we sometimes need to use invertible formulas. *) | CvtE (e1, _, _) | UnE (#Xl.Num.unop, _, e1) | TheE e1 | LiftE e1 @@ -121,7 +121,7 @@ and det_quant_exp e = ) @@ fun _ -> match e.it with | VarE x -> bound_varid x - | BoolE _ | NumE _ | TextE _ -> empty + | BoolE _ | NumE _ | TextE _ | IfE _ -> empty | UnE (_, _, e1) | ProjE (e1, _) | TheE e1 | LiftE e1 | LenE e1 | CvtE (e1, _, _) | SubE (e1, _, _) -> det_quant_exp e1 @@ -189,7 +189,7 @@ and det_prem pr = | RulePr (_x, _as, _mixop, e) -> det_exp e | IfPr e -> det_cond_exp e | LetPr (_qs, e1, _e2) -> det_exp e1 - | ElsePr -> empty + | ElsePr | NegPr _ -> empty | IterPr (pr1, ite) -> det_iterexp (det_prem pr1) ite diff --git a/spectec/src/frontend/dim.ml b/spectec/src/frontend/dim.ml index 166a2897c2..b1921f410d 100644 --- a/spectec/src/frontend/dim.ml +++ b/spectec/src/frontend/dim.ml @@ -187,7 +187,8 @@ and check_exp dims ctx e = | CompE (e1, e2) -> check_exp dims ctx e1; check_exp dims ctx e2 - | SliceE (e1, e2, e3) -> + | SliceE (e1, e2, e3) + | IfE (e1, e2, e3) -> check_exp dims ctx e1; check_exp dims ctx e2; check_exp dims ctx e3 @@ -266,6 +267,8 @@ and check_prem dims ctx prem = check_exp dims ctx e2 | IterPr (prem1, ite) -> check_iterexp dims ctx check_prem prem1 ite + | NegPr prem1 -> + check_prem dims ctx prem1 and check_arg dims ctx a = match a.it with @@ -570,6 +573,11 @@ and annot_exp side dims e : exp * occur = | CaseE (atom, e1, ch) -> let e1', occur1 = annot_exp side dims e1 in CaseE (atom, e1', ch), occur1 + | IfE (e1, e2, e3) -> + let e1', occur1 = annot_exp side dims e1 in + let e2', occur2 = annot_exp side dims e2 in + let e3', occur3 = annot_exp side dims e3 in + IfE (e1', e2', e3'), union occur1 (union occur2 occur3) | CvtE (e1, nt1, nt2) -> let e1', occur1 = annot_exp side dims e1 in CvtE (e1', nt1, nt2), occur1 @@ -692,6 +700,9 @@ and annot_prem dims prem : prem * occur = let prem1', occur1 = annot_prem dims prem1 in let iter', occur' = annot_iterexp `Rhs dims occur1 iter prem.at in IterPr (prem1', iter'), occur' + | NegPr prem1 -> + let prem1', occur1 = annot_prem dims prem1 in + NegPr prem1', occur1 in {prem with it}, occur (* diff --git a/spectec/src/il/ast.ml b/spectec/src/il/ast.ml index ea8604c470..83f6f0edeb 100644 --- a/spectec/src/il/ast.ml +++ b/spectec/src/il/ast.ml @@ -78,6 +78,7 @@ and exp' = | SliceE of exp * exp * exp (* exp[exp : exp] *) | UpdE of exp * path * exp (* exp[path = exp] *) | ExtE of exp * path * exp (* exp[path =.. exp] *) + | IfE of exp * exp * exp (* `if` exp exp exp *) | CallE of id * arg list (* defid( arg* ) *) | IterE of exp * iterexp (* exp iter *) | CvtE of exp * numtyp * numtyp (* exp : typ1 <:> typ2 *) @@ -160,6 +161,7 @@ and prem' = | LetPr of quant list * exp * exp (* binding *) | ElsePr (* otherwise *) | IterPr of prem * iterexp (* iteration *) + | NegPr of prem (* negated premise *) and hintdef = hintdef' phrase and hintdef' = diff --git a/spectec/src/il/dune b/spectec/src/il/dune index 7ed9035a82..2cb4bc8a45 100644 --- a/spectec/src/il/dune +++ b/spectec/src/il/dune @@ -1,5 +1,5 @@ (library (name il) (libraries util zarith xl el) - (modules ast eq free fresh subst iter env eval print debug valid) + (modules ast eq free fresh subst iter walk env eval print debug valid) ) diff --git a/spectec/src/il/eval.ml b/spectec/src/il/eval.ml index c77e28da5b..a22318f419 100644 --- a/spectec/src/il/eval.ml +++ b/spectec/src/il/eval.ml @@ -535,6 +535,13 @@ and reduce_exp static env e : exp result = Ok {e1' with note = e.note} | _ -> Ok (SubE (e1', t1', t2') $> e) ) + | IfE (e1, e2, e3) -> + let** e1' = reduce_exp static env e1 in + (match e1'.it with + | BoolE true -> reduce_exp static env e2 + | BoolE false -> reduce_exp static env e3 + | _ -> Ok (IfE (e1', e2, e3) $> e) (* do not reduce arms *) + ) and reduce_iter static env iter : iter result = match iter with @@ -696,6 +703,12 @@ and reduce_prem env prem : subst option result = let** e1' = reduce_exp false env e1 in let** e2' = reduce_exp false env e2 in match_exp false env Subst.empty e2' e1' + | NegPr prem -> + (match reduce_prem env prem with + | Ok None -> Ok None + | Ok (Some _s) -> Error None + | Error _ -> Ok (Some Subst.empty) + ) | IterPr (prem1, iterexp) -> let** iter', xes' = reduce_iterexp false env iterexp in (* Distinguish between let-defined variables, which flow outwards, @@ -1356,4 +1369,6 @@ let reduce_arg = reduce_arg false let match_iter = match_iter false let match_exp = match_exp false +let match_arg_static = match_arg true let match_arg = match_arg false + diff --git a/spectec/src/il/eval.mli b/spectec/src/il/eval.mli index 7ea7ac8e35..8eea7410d8 100644 --- a/spectec/src/il/eval.mli +++ b/spectec/src/il/eval.mli @@ -23,6 +23,7 @@ val match_iter : env -> subst -> iter -> iter -> subst option result val match_exp : env -> subst -> exp -> exp -> subst option result val match_typ : env -> subst -> typ -> typ -> subst option result val match_arg : env -> subst -> arg -> arg -> subst option result +val match_arg_static : env -> subst -> arg -> arg -> subst option result val match_list : (env -> subst -> 'a -> 'a -> subst option result) -> diff --git a/spectec/src/il/free.ml b/spectec/src/il/free.ml index 3f4611c5d5..369c9f688c 100644 --- a/spectec/src/il/free.ml +++ b/spectec/src/il/free.ml @@ -65,7 +65,7 @@ and free_exp e = | UnE (_, _, e1) | LiftE e1 | LenE e1 | ProjE (e1, _) | TheE e1 -> free_exp e1 | BinE (_, _, e1, e2) | CmpE (_, _, e1, e2) | IdxE (e1, e2) | CompE (e1, e2) | MemE (e1, e2) | CatE (e1, e2) -> free_exp e1 ++ free_exp e2 - | SliceE (e1, e2, e3) -> free_list free_exp [e1; e2; e3] + | SliceE (e1, e2, e3) | IfE (e1, e2, e3) -> free_list free_exp [e1; e2; e3] | OptE eo -> free_opt free_exp eo | TupE es | ListE es -> free_list free_exp es | UpdE (e1, p, e2) | ExtE (e1, p, e2) -> free_exp e1 ++ free_path p ++ free_exp e2 @@ -113,6 +113,7 @@ and free_prem prem = | LetPr (qs, e1, e2) -> (free_exp e1 -- bound_quants qs) ++ free_exp e2 | ElsePr -> empty | IterPr (prem1, ite) -> (free_prem prem1 -- bound_iterexp ite) ++ free_iterexp ite + | NegPr prem1 -> free_prem prem1 and bound_prem prem = match prem.it with diff --git a/spectec/src/il/iter.ml b/spectec/src/il/iter.ml index 4ac9701322..5bd411afb8 100644 --- a/spectec/src/il/iter.ml +++ b/spectec/src/il/iter.ml @@ -168,7 +168,7 @@ and exp e = | StrE (efs, _) -> list expfield efs | DotE (e1, at) -> exp e1; atom at | CompE (e1, e2) | MemE (e1, e2) | CatE (e1, e2) | IdxE (e1, e2) -> exp e1; exp e2 - | SliceE (e1, e2, e3) -> exp e1; exp e2; exp e3 + | SliceE (e1, e2, e3) | IfE (e1, e2, e3) -> exp e1; exp e2; exp e3 | UpdE (e1, p, e2) | ExtE (e1, p, e2) -> exp e1; path p; exp e2 | CallE (x, as_) -> defid x; args as_ | IterE (e1, it) -> iterexp exp e1 it @@ -211,6 +211,7 @@ and prem pr = | ElsePr -> () | IterPr (pr1, it) -> iterexp prem pr1 it | LetPr (qs, e1, e2) -> params qs; exp e1; exp e2 + | NegPr pr1 -> prem pr1 and prems prs = list prem prs diff --git a/spectec/src/il/print.ml b/spectec/src/il/print.ml index 6208809a06..1898a137c0 100644 --- a/spectec/src/il/print.ml +++ b/spectec/src/il/print.ml @@ -164,6 +164,8 @@ and string_of_exp e = | CaseE (op, e1, ch) -> string_of_check ch ^ string_of_mixop op ^ "_" ^ string_of_typ_name e.note ^ string_of_exp_args e1 + | IfE (e1, e2, e3) -> + "(if " ^ string_of_exp e1 ^ " then " ^ string_of_exp e2 ^ " else " ^ string_of_exp e3 ^ ")" | CvtE (e1, nt1, nt2) -> "(" ^ string_of_exp e1 ^ " : " ^ string_of_numtyp nt1 ^ " <:> " ^ string_of_numtyp nt2 ^ ")" | SubE (e1, t1, t2) -> @@ -235,6 +237,7 @@ and string_of_prem prem = string_of_prem prem' ^ string_of_iterexp iter | IterPr (prem', iter) -> "(" ^ string_of_prem prem' ^ ")" ^ string_of_iterexp iter + | NegPr prem' -> "~ " ^ string_of_prem prem' (* Definitions *) diff --git a/spectec/src/il/subst.ml b/spectec/src/il/subst.ml index 31dc1246b1..51182b5ab4 100644 --- a/spectec/src/il/subst.ml +++ b/spectec/src/il/subst.ml @@ -191,6 +191,7 @@ and subst_exp s e = CaseE (op, subst_exp s e1, ch) | CvtE (e1, nt1, nt2) -> CvtE (subst_exp s e1, nt1, nt2) | SubE (e1, t1, t2) -> SubE (subst_exp s e1, subst_typ s t1, subst_typ s t2) + | IfE (e1, e2, e3) -> IfE (subst_exp s e1, subst_exp s e2, subst_exp s e3) ) $$ e.at % subst_typ s e.note and subst_expfield s (atom, e) = (atom, subst_exp s e) @@ -240,6 +241,7 @@ and subst_prem s prem = | LetPr (qs, e1, e2) -> let s' = remove_varids s (Free.bound_quants qs).Free.varid in LetPr (qs, subst_exp s' e1, subst_exp s e2) + | NegPr prem1 -> NegPr (subst_prem s prem1) ) $ prem.at and subst_prems s prems = diff --git a/spectec/src/il/valid.ml b/spectec/src/il/valid.ml index aebd43bfff..68e4f031ed 100644 --- a/spectec/src/il/valid.ml +++ b/spectec/src/il/valid.ml @@ -357,6 +357,13 @@ and infer_exp (env : Env.t) e : typ = | CaseE _ -> e.note (* error e.at "cannot infer type of case constructor" *) | CvtE (_, _, t2) -> NumT t2 $ e.at | SubE (_, _, t2) -> t2 + | IfE (_, e2, e3) -> + let t2 = infer_exp env e2 in + let t3 = infer_exp env e3 in + if Eq.eq_typ t2 t3 then + t2 + else + error e.at "cannot infer type of if expression: branches have different types" and valid_exp ?(side = `Rhs) env e t = @@ -511,6 +518,10 @@ and valid_exp ?(side = `Rhs) env e t = let t1, _qs, _prems = find_case cases op e1.at in valid_mixop env op; valid_exp ~side env e1 t1 + | IfE (e1, e2, e3) -> + valid_exp ~side env e1 (BoolT $ e1.at); + valid_exp ~side env e2 t; + valid_exp ~side env e3 t | CvtE (e1, nt1, nt2) -> valid_exp ~side env e1 (NumT nt1 $ e1.at); equiv_typ env (NumT nt2 $e.at) t e.at; @@ -644,6 +655,7 @@ and valid_prem env prem = let _it, env' = valid_iterexp env ite prem.at in let _env'' = valid_prem env' prem' in env (* TODO: out it *) + | NegPr prem' -> valid_prem env prem' and valid_prems env prems = List.fold_left valid_prem env prems diff --git a/spectec/src/il/walk.ml b/spectec/src/il/walk.ml new file mode 100644 index 0000000000..ebbf0bcd6d --- /dev/null +++ b/spectec/src/il/walk.ml @@ -0,0 +1,362 @@ +(* + This file provides a more generic version of the "il_walk.ml" used in the IL2AL pass. + This is adapted from the IL2AL, however it should give more flexibility to be used as + well in the middlend. + + This file currently supports four kinds of traversals: + - Transformation traversal, which transforms a specific portion of the AST + - Collection traversal, which traverses the AST, collecting a specific term, constructing a + list in the process + - Exists traversal, which checks a specific predicate is true at any point of the AST + - Forall traversal, which checks whetehr a specific predicate is true everywhere in the + AST. + + One can define custom functions that modifies how these traversals work currently for + expressions, types, binders, iter expressions, and arguments. This can be extended + for others if necessary. +*) +open Util.Source +open Ast + +(* Base traversal *) + +type transformer = { + transform_exp: exp -> exp; + transform_prem: prem -> prem; + transform_iterexp: iterexp -> iterexp; + transform_typ: typ -> typ; + transform_arg: arg -> arg; + transform_path: path -> path; + + (* IDs *) + transform_var_id: id -> id; + transform_typ_id: id -> id; + transform_rel_id: id -> id; + transform_def_id: id -> id; + transform_gram_id: id -> id; + + filter_exp : exp -> exp option +} + +let id = Fun.id +let op_id = fun x -> Some x + +let base_transformer = { + transform_exp = id; + transform_prem = id; + transform_iterexp = id; + transform_typ = id; + transform_arg = id; + transform_path = id; + + transform_var_id = id; + transform_typ_id = id; + transform_rel_id = id; + transform_def_id = id; + transform_gram_id = id; + + filter_exp = op_id +} + +let rec transform_typ t typ = + let f = t.transform_typ in + let t_typ = transform_typ t in + let it = + match typ.it with + | VarT (id, args) -> VarT (t.transform_typ_id id, List.map (transform_arg t) args) + | IterT (typ', iter) -> IterT (t_typ typ', transform_iter t iter) + | TupT idtyps -> TupT (List.map (fun (id, typ') -> (t.transform_var_id id, transform_typ t typ')) idtyps) + | t' -> t' + in + f { typ with it } + +and transform_exp t e = + let f = t.transform_exp in + let g = t.filter_exp in + let t_exp = transform_exp t in + let it = + match e.it with + | BoolE _ + | NumE _ + | TextE _ -> e.it + | VarE id -> VarE (t.transform_var_id id) + | CvtE (e1, nt1, nt2) -> CvtE (t_exp e1, nt1, nt2) + | UnE (op, nt, e1) -> UnE (op, nt, t_exp e1) + | BinE (op, nt, e1, e2) -> BinE (op, nt, t_exp e1, t_exp e2) + | CmpE (op, nt, e1, e2) -> CmpE (op, nt, t_exp e1, t_exp e2) + | IdxE (e1, e2) -> IdxE (t_exp e1, t_exp e2) + | SliceE (e1, e2, e3) -> SliceE (t_exp e1, t_exp e2, t_exp e3) + | UpdE (e1, p, e2) -> UpdE (t_exp e1, transform_path t p, t_exp e2) + | ExtE (e1, p, e2) -> ExtE (t_exp e1, transform_path t p, t_exp e2) + | StrE (efs, ch) -> StrE (List.map (fun (a, e) -> (a, t_exp e)) efs, ch) + | DotE (e1, atom) -> DotE (t_exp e1, atom) + | CompE (e1, e2) -> CompE (t_exp e1, t_exp e2) + | LenE e1 -> LenE (t_exp e1) + | TupE es -> TupE ((List.map t_exp) es) + | CallE (id, as1) -> CallE (t.transform_def_id id, List.map (transform_arg t) as1) + | IterE (e1, iter) -> IterE (t_exp e1, transform_iterexp t iter) + | ProjE (e1, i) -> ProjE (t_exp e1, i) + | UncaseE (e1, op) -> UncaseE (t_exp e1, op) + | OptE eo -> OptE ((Option.map t_exp) eo) + | TheE e1 -> TheE (t_exp e1) + | ListE es -> ListE ((List.map t_exp) es) + | LiftE e1 -> LiftE (t_exp e1) + | CatE (e1, e2) -> CatE (t_exp e1, t_exp e2) + | MemE (e1, e2) -> MemE (t_exp e1, t_exp e2) + | CaseE (mixop, e1, ch) -> CaseE (mixop, t_exp e1, ch) + | SubE (e1, _t1, t2) -> SubE (t_exp e1, _t1, t2) + | IfE (e1, e2, e3) -> IfE (t_exp e1, t_exp e2, t_exp e3) + in + + let e' = + match g {e with it; note = transform_typ t e.note } with + | Some e' -> f e' + | None -> e + in + f e' + +and transform_iter t iter = + match iter with + | ListN (exp, Some id) -> ListN (transform_exp t exp, Some (t.transform_var_id id)) + | ListN (exp, id) -> ListN (transform_exp t exp, id) + | _ -> iter + +and transform_iterexp t (iter, ides) = + let f = t.transform_iterexp in + let iterexp' = (transform_iter t iter, List.map (fun (id, e) -> (t.transform_var_id id, transform_exp t e)) ides) in + f iterexp' + +and transform_path t p = + let f = t.transform_path in + let it = (match p.it with + | RootP -> RootP + | DotP (p', a) -> DotP (transform_path t p', a) + | IdxP (p', e) -> IdxP (transform_path t p', transform_exp t e) + | SliceP (p', e1, e2) -> SliceP (transform_path t p', transform_exp t e1, transform_exp t e2) + ) + in + f { p with it = it; note = transform_typ t p.note } + +and transform_arg t a = + let f = t.transform_arg in + let it = + match a.it with + | ExpA e -> ExpA (transform_exp t e) + | TypA typ -> TypA (transform_typ t typ) + | DefA id -> DefA (t.transform_def_id id) + | GramA sym -> GramA (transform_sym t sym) + in + f { a with it } + +and transform_prem t p = + let f = t.transform_prem in + let it = match p.it with + | RulePr (id, args, op, e) -> RulePr (t.transform_rel_id id, List.map (transform_arg t) args, op, transform_exp t e) + | IfPr e -> IfPr (transform_exp t e) + | LetPr (quants, e1, e2) -> LetPr (List.map (transform_param t) quants, transform_exp t e1, transform_exp t e2) + | ElsePr -> ElsePr + | IterPr (p, ie) -> IterPr (transform_prem t p, transform_iterexp t ie) + | NegPr p -> NegPr (transform_prem t p) + in + f { p with it } + +and transform_param t p = + { p with it = match p.it with + | ExpP (id, typ) -> ExpP (t.transform_var_id id, transform_typ t typ) + | TypP id -> TypP (t.transform_typ_id id) + | DefP (id, params, typ) -> DefP (t.transform_def_id id, List.map (transform_param t) params, transform_typ t typ) + | GramP (id, params, typ) -> GramP (t.transform_gram_id id, List.map (transform_param t) params, transform_typ t typ) + } + +and transform_sym t s = + { s with it = match s.it with + | VarG (id, args) -> VarG (t.transform_gram_id id, List.map (transform_arg t) args) + | NumG i -> NumG i + | TextG st -> TextG st + | EpsG -> EpsG + | SeqG syms -> SeqG (List.map (transform_sym t) syms) + | AltG syms -> AltG (List.map (transform_sym t) syms) + | RangeG (s1, s2) -> RangeG (transform_sym t s1, transform_sym t s2) + | IterG (s1, iterexp) -> IterG (transform_sym t s1, transform_iterexp t iterexp) + | AttrG (e, s1) -> AttrG (transform_exp t e, transform_sym t s1) + } + +and transform_deftyp t dt = + { dt with it = match dt.it with + | AliasT typ -> AliasT (transform_typ t typ) + | StructT typfields -> StructT (List.map (fun (a, (typ, quants, prems), hints) -> + (a, (transform_typ t typ, List.map (transform_param t) quants, List.map (transform_prem t) prems), hints)) typfields + ) + | VariantT typcases -> VariantT (List.map (fun (m, (typ, quants, prems), hints) -> + (m, (transform_typ t typ, List.map (transform_param t) quants, List.map (transform_prem t) prems), hints)) typcases + ) + } + +and transform_clause t c = + { c with it = match c.it with + | DefD (quants, args, exp, prems) -> + DefD (List.map (transform_param t) quants, List.map (transform_arg t) args, transform_exp t exp, List.map (transform_prem t) prems) } + +and transform_rule t r = + let RuleD (id, quants, mixop, exp, prems) = r.it in + RuleD (t.transform_rel_id id, List.map (transform_param t) quants, mixop, transform_exp t exp, List.map (transform_prem t) prems) $ r.at + +and transform_inst t inst = + { inst with it = match inst.it with + | InstD (quants, args, deftyp) -> InstD (List.map (transform_param t) quants, List.map (transform_arg t) args, transform_deftyp t deftyp) + } + +and transform_prod t p = + { p with it = match p.it with + | ProdD (quants, sym, exp, prems) -> ProdD (List.map (transform_param t) quants, transform_sym t sym, transform_exp t exp, List.map (transform_prem t) prems) + } +and transform_def t d = + { d with it = match d.it with + | TypD (id, params, insts) -> TypD (t.transform_typ_id id, List.map (transform_param t) params, List.map (transform_inst t) insts) + | RelD (id, params, m, typ, rules) -> RelD (t.transform_rel_id id, List.map (transform_param t) params, m, transform_typ t typ, List.map (transform_rule t) rules) + | DecD (id, params, typ, clauses) -> DecD (t.transform_def_id id, List.map (transform_param t) params, transform_typ t typ, List.map (transform_clause t) clauses) + | GramD (id, params, typ, prods) -> GramD (t.transform_gram_id id, List.map (transform_param t) params, transform_typ t typ, List.map (transform_prod t) prods) + | RecD defs -> RecD (List.map (transform_def t) defs) + | d' -> d' + } + +(* Collection traversal *) + +type 'a collector = { + default: 'a; + compose: 'a -> 'a -> 'a; + collect_exp: exp -> 'a * bool; + collect_prem: prem -> 'a * bool; + collect_iterexp: iterexp -> 'a * bool; + collect_typ: typ -> 'a * bool; + collect_arg: arg -> 'a * bool +} + +let no_collect default = fun _ -> (default, true) + +let base_collector default compose = { + default = default; + compose = compose; + collect_exp = no_collect default; + collect_prem = no_collect default; + collect_iterexp = no_collect default; + collect_typ = no_collect default; + collect_arg = no_collect default +} + +let compose_list c (f : 'a -> 'b) (traverse_list : 'a list): 'b = + List.fold_right (fun v acc -> c.compose (f v) acc) traverse_list c.default + +let rec collect_typ c typ = + let f = c.collect_typ in + let c_typ = collect_typ c in + let ( $@ ) = c.compose in + let traverse_list = + match typ.it with + | VarT (_, args) -> compose_list c (collect_arg c) args + | IterT (typ', iter) -> c_typ typ' $@ collect_iter c iter + | TupT idtyps -> compose_list c (fun (_, typ') -> c_typ typ') idtyps + | _ -> c.default + in + let (res, continue) = f typ in + res $@ if continue then traverse_list else c.default + +and collect_exp c e = + let f = c.collect_exp in + let c_exp = collect_exp c in + let ( $@ ) = c.compose in + let traverse_list = + match e.it with + | VarE _ | BoolE _ | NumE _ + | OptE None | TextE _ -> c.default + | CvtE (e1, _, _) | DotE (e1, _)| LenE e1 + | ProjE (e1, _) | UncaseE (e1, _) | OptE (Some e1) + | TheE e1 | LiftE e1 | CaseE (_, e1, _) | UnE (_, _, e1) -> c_exp e1 + | BinE (_, _, e1, e2) | CmpE (_, _, e1, e2) | CompE (e1, e2) + | CatE (e1, e2)| MemE (e1, e2) | IdxE (e1, e2) -> c_exp e1 $@ c_exp e2 + | IfE (e1, e2, e3) | SliceE (e1, e2, e3) -> c_exp e1 $@ c_exp e2 $@ c_exp e3 + | UpdE (e1, p, e2) | ExtE (e1, p, e2) -> c_exp e1 $@ collect_path c p $@ c_exp e2 + | StrE (efs, _) -> compose_list c (fun (_, e) -> c_exp e) efs + | ListE es + | TupE es -> compose_list c c_exp es + | CallE (_, as1) -> compose_list c (collect_arg c) as1 + | IterE (e1, iter) -> c_exp e1 $@ collect_iterexp c iter + | SubE (e1, t1, t2) -> c_exp e1 $@ collect_typ c t1 $@ collect_typ c t2 + in + let (res, continue) = f e in + res $@ if continue then traverse_list else c.default + +and collect_iter c iter = + match iter with + | ListN (exp, _) -> collect_exp c exp + | _ -> c.default + +and collect_iterexp c iterexp = + let (iter, ides) = iterexp in + let f = c.collect_iterexp in + let ( $@ ) = c.compose in + let traverse_list = collect_iter c iter $@ compose_list c (fun (_, e) -> collect_exp c e) ides in + let (res, continue) = f iterexp in + res $@ if continue then traverse_list else c.default + +and collect_path c p = + let ( $@ ) = c.compose in + match p.it with + | RootP -> c.default + | DotP (p', _) -> collect_path c p' + | IdxP (p', e) -> collect_path c p' $@ collect_exp c e + | SliceP (p', e1, e2) -> collect_path c p' $@ collect_exp c e1 $@ collect_exp c e2 + +and collect_arg c a = + let f = c.collect_arg in + let ( $@ ) = c.compose in + let traverse_list = + match a.it with + | ExpA e -> collect_exp c e + | TypA typ -> collect_typ c typ + | GramA s -> collect_sym c s + | _ -> c.default + in + let (res, continue) = f a in + res $@ if continue then traverse_list else c.default + +and collect_prem c p = + let f = c.collect_prem in + let ( $@ ) = c.compose in + let traverse_list = match p.it with + | RulePr (_, args, _, e) -> compose_list c (collect_arg c) args $@ collect_exp c e + | IfPr e -> collect_exp c e + | LetPr (quants, e1, e2) -> compose_list c (collect_param c) quants $@ collect_exp c e1 $@ collect_exp c e2 + | ElsePr -> c.default + | IterPr (p, ie) -> collect_prem c p $@ collect_iterexp c ie + | NegPr p -> collect_prem c p + in + let (res, continue) = f p in + res $@ if continue then traverse_list else c.default + +and collect_param c p = + let ( $@ ) = c.compose in + match p.it with + | ExpP (_, typ) -> collect_typ c typ + | TypP _ -> c.default + | DefP (_, params, typ) -> compose_list c (collect_param c) params $@ collect_typ c typ + | GramP (_, params, typ) -> compose_list c (collect_param c) params $@ collect_typ c typ + +and collect_sym c s = + let ( $@ ) = c.compose in + match s.it with + | VarG (_, args) -> compose_list c (collect_arg c) args + | NumG _ + | TextG _ + | EpsG -> c.default + | SeqG syms + | AltG syms -> compose_list c (collect_sym c) syms + | RangeG (s1, s2) -> collect_sym c s1 $@ collect_sym c s2 + | IterG (s1, iterexp) -> collect_sym c s1 $@ collect_iterexp c iterexp + | AttrG (e, s1) -> collect_exp c e $@ collect_sym c s1 + +(* Concrete base collectors for convenience *) + +let exists_base_checker = base_collector false (||) + +let forall_base_checker = base_collector true (&&) diff --git a/spectec/src/il2al/animate.ml b/spectec/src/il2al/animate.ml index 54e1b49cef..c69708c18a 100644 --- a/spectec/src/il2al/animate.ml +++ b/spectec/src/il2al/animate.ml @@ -96,6 +96,7 @@ let rec rewrite_iterexp' iterexp pr = LetPr (new_qs, new_ e1, new_ e2) | ElsePr -> ElsePr | IterPr (pr, (iter, xes)) -> IterPr (rewrite_iterexp iterexp pr, (iter, xes |> List.map (fun (x, e) -> (x, new_ e)))) + | NegPr pr' -> NegPr (rewrite_iterexp iterexp pr') and rewrite_iterexp iterexp pr = Source.map (rewrite_iterexp' iterexp) pr (* Recover iterexp of IterPr *) @@ -130,6 +131,7 @@ let rec recover_iterexp' iterexp pr = LetPr (new_qs, new_ e1, new_ e2) | ElsePr -> ElsePr | IterPr (pr, (iter, xes)) -> IterPr (recover_iterexp iterexp pr, (iter, xes |> List.map (fun (x, e) -> (x, new_ e)))) + | NegPr prem -> NegPr (recover_iterexp iterexp prem) and recover_iterexp iterexp pr = Source.map (recover_iterexp' iterexp) pr (* is this assign premise a if-let? *) diff --git a/spectec/src/il2al/free.ml b/spectec/src/il2al/free.ml index d54c54c797..c6cf5fdd55 100644 --- a/spectec/src/il2al/free.ml +++ b/spectec/src/il2al/free.ml @@ -28,7 +28,7 @@ let rec free_exp ignore_listN e = f e1 | BinE (_, _, e1, e2) | CmpE (_, _, e1, e2) | IdxE (e1, e2) | CompE (e1, e2) | MemE (e1, e2) | CatE (e1, e2) -> free_list f [e1; e2] - | SliceE (e1, e2, e3) -> free_list f [e1; e2; e3] + | SliceE (e1, e2, e3) | IfE (e1, e2, e3) -> free_list f [e1; e2; e3] | OptE eo -> free_opt f eo | TupE es | ListE es -> free_list f es | UpdE (e1, p, e2) | ExtE (e1, p, e2) -> @@ -89,6 +89,7 @@ let rec free_prem ignore_listN prem = let free1 = fp prem' in let bound, free2 = fi iter in (free1 ++ free2) -- bound + | NegPr prem' -> fp prem' (* For unification *) diff --git a/spectec/src/il2al/il_walk.ml b/spectec/src/il2al/il_walk.ml index 203cfab6ee..1d49210053 100644 --- a/spectec/src/il2al/il_walk.ml +++ b/spectec/src/il2al/il_walk.ml @@ -52,6 +52,7 @@ let rec transform_exp t e = | MemE (e1, e2) -> MemE (t_exp e1, t_exp e2) | CaseE (mixop, e1, ch) -> CaseE (mixop, t_exp e1, ch) | SubE (e1, _t1, t2) -> SubE (t_exp e1, _t1, t2) + | IfE (e1, e2, e3) -> IfE (t_exp e1, t_exp e2, t_exp e3) in f { e with it } @@ -75,6 +76,7 @@ and transform_prem t p = | LetPr (qs, e1, e2) -> LetPr (qs, transform_exp t e1, transform_exp t e2) | ElsePr -> ElsePr | IterPr (p, ie) -> IterPr (transform_prem t p, transform_iterexp t ie) + | NegPr p -> NegPr (transform_prem t p) in f { p with it } diff --git a/spectec/src/il2al/translate.ml b/spectec/src/il2al/translate.ml index b00795857d..cf3d977a8a 100644 --- a/spectec/src/il2al/translate.ml +++ b/spectec/src/il2al/translate.ml @@ -993,6 +993,7 @@ and translate_prem prem = if args <> [] then error prem.at "Cannot handle rule arguments"; translate_rulepr id exp | Il.IterPr (pr, iterexp) -> translate_iterpr pr iterexp + | Il.NegPr _ -> error at "encountered a negated premise" (* `premise list` -> `instr list` (return instructions) -> `instr list` *) diff --git a/spectec/src/middlend/.gitattributes b/spectec/src/middlend/.gitattributes new file mode 100644 index 0000000000..d671224e72 --- /dev/null +++ b/spectec/src/middlend/.gitattributes @@ -0,0 +1 @@ +dune.inc merge=binary \ No newline at end of file diff --git a/spectec/src/middlend/aliasDemut.ml b/spectec/src/middlend/aliasDemut.ml new file mode 100644 index 0000000000..ca3e386a99 --- /dev/null +++ b/spectec/src/middlend/aliasDemut.ml @@ -0,0 +1,57 @@ +open Util +open Source +open Il.Ast +open Il.Walk + +(* Errors *) + +let error at msg = Error.error at "alias recursion lifting" msg + +(* Environment *) + +(* Global IL env*) +let env_ref = ref Il.Env.empty + +module S = Set.Make(String) + +type env = { + aliases : S.t; (* Aliases to reduce *) +} + +(* The main transformation case *) + +let t_typ env x = + match x.it with + | VarT (id, []) when S.mem id.it env.aliases -> + (match Il.Eval.reduce_typ !env_ref x with + | Ok x' -> x' + | Error _ -> x + ) + | _ -> x + +let alias_def_id def = + match def.it with + | TypD(id, _, [{it = InstD (_, _, {it = AliasT _; _}); _}]) -> Some id.it + | _ -> None + +let is_alias_typ_def def = Option.is_some (alias_def_id def) + +let rec t_def env def = + let t = { base_transformer with transform_typ = t_typ env } in + match def.it with + | RecD defs -> + let alias_defs, other_defs = List.partition is_alias_typ_def defs in + let new_ids = List.filter_map alias_def_id alias_defs in + let env' = { aliases = S.union env.aliases (S.of_list new_ids) } in + let other_defs = List.concat_map (t_def env') other_defs in + let alias_defs = List.concat_map (t_def env') alias_defs in + if other_defs = [] then + error (at def) "mutual group consists entirely of type aliases; at least one non-alias definition is required" + else + [ { def with it = RecD other_defs} ] @ alias_defs + | _ -> [ transform_def t def ] + +let transform (defs : script) = + env_ref := Il.Env.env_of_script defs; + let env = { aliases = S.empty } in + List.concat_map (t_def env) defs diff --git a/spectec/src/middlend/aliasDemut.mli b/spectec/src/middlend/aliasDemut.mli new file mode 100644 index 0000000000..debddf87e6 --- /dev/null +++ b/spectec/src/middlend/aliasDemut.mli @@ -0,0 +1,5 @@ +(* +Lifts type aliases out of mutual groups. +*) + +val transform : Il.Ast.script -> Il.Ast.script \ No newline at end of file diff --git a/spectec/src/middlend/dune b/spectec/src/middlend/dune index 8585c04905..a76bac5174 100644 --- a/spectec/src/middlend/dune +++ b/spectec/src/middlend/dune @@ -6,5 +6,16 @@ totalize unthe sideconditions + typefamilyremoval + else + undep + utils + subexpansion + uncaseremoval + aliasDemut + improveids + ite + elsesimp + letintromech ) ) diff --git a/spectec/src/middlend/else.ml b/spectec/src/middlend/else.ml new file mode 100644 index 0000000000..cdafab8dee --- /dev/null +++ b/spectec/src/middlend/else.ml @@ -0,0 +1,198 @@ +open Util +open Source +open Il.Ast + +module StringMap = Map.Make(String) +module StringSet = Set.Make(String) + +let env_ref = ref Il.Env.empty + +let else_relation_hint_id = "else-relation" + +(* Brought from Apart.ml *) + +(* Looks at an expression of type list from the back and chops off all + known _elements_, followed by the list of all list expressions. + Returns it all in reverse order. + *) +let rec to_snoc_list (e : exp) : exp list * exp list = match e.it with + | ListE es -> List.rev es, [] + | CatE (e1, e2) -> + let tailelems2, listelems2 = to_snoc_list e2 in + if listelems2 = [] + (* Second list is fully known? Can look at first list *) + then let tailelems1, listelems1 = to_snoc_list e1 in + tailelems2 @ tailelems1, listelems1 + (* Second list has unknown elements, have to stop there *) + else tailelems2, listelems2 @ [e1] + | _ -> [], [e] + +(* Taking as input a exp of type list, return all of the known elements *) +let rec get_known_elements (e : exp) : exp list = match e.it with + | ListE es -> es + | CatE (e1, e2) -> get_known_elements e1 @ get_known_elements e2 + | _ -> [] + +(* We assume the expressions to be of the same type; for ill-typed inputs + no guarantees are made. *) +let rec apart (e1 : exp) (e2: exp) : bool = + if Il.Eq.eq_exp e1 e2 then false else + match e1.it, e2.it with + (* A literal is never a literal of other type *) + | NumE n1, NumE n2 -> not (n1 = n2) + | BoolE b1, BoolE b2 -> not (b1 = b2) + | TextE t1, TextE t2 -> not (t1 = t2) + | CaseE (m1, exp1, _ch1), CaseE (m2, exp2, _ch2) -> + not (m1 = m2) || apart exp1 exp2 + | TupE es1, TupE es2 when List.length es1 = List.length es2 -> + List.exists2 apart es1 es2 + | (CatE _ | ListE _), (CatE _ | ListE _) -> + list_exp_apart e1 e2 + | SubE (e1, _, _), SubE (e2, _, _) -> apart e1 e2 + (* Check if the specific case exists in the subtype *) + | CaseE (m, _, _), SubE (_, {it = VarT (id, _); _}, _) + | SubE (_, {it = VarT (id, _); _}, _), CaseE (m, _, _) -> + begin match Il.Env.find_opt_typ !env_ref id with + | Some (_, insts) -> + List.find_opt (fun inst -> match inst.it with + | InstD (_, _, {it = VariantT typcases; _}) -> + List.find_opt (fun (m', _, _) -> + Il.Eq.eq_mixop m m' + ) typcases |> Option.is_some + | _ -> false + ) insts |> Option.is_none + | None -> false + end + (* We do not know anything about variables and functions *) + | _ , _ -> false (* conservative *) + +(* Two list expressions are apart if either their manifest tail elements are apart *) +and list_exp_apart e1 e2 = + let (tailelems1, listelems1), (tailelems2, listelems2) = (to_snoc_list e1), (to_snoc_list e2) in + snoc_list_apart (tailelems1, listelems1) (tailelems2, listelems2) || + + (* Final attempt - check pairwise its known elements IF one of the lists is completely known *) + match listelems1, listelems2 with + | [], [] -> false (* Should have been covered by snoc_list_apart *) + | [], _ -> + let k_e2 = get_known_elements e2 in + List.exists (fun e2' -> List.for_all (fun e1' -> apart e1' e2') tailelems1) k_e2 + | _, [] -> + let k_e1 = get_known_elements e1 in + List.exists (fun e2' -> List.for_all (fun e1' -> apart e1' e2') tailelems2) k_e1 + | _, _ -> false (* Can't tell *) + +and snoc_list_apart (tailelems1, listelems1) (tailelems2, listelems2) = + match tailelems1, listelems1, tailelems2, listelems2 with + (* If the heads are apart, the lists are apart *) + | e1 :: e1s, _, e2 :: e2s, _ -> apart e1 e2 || snoc_list_apart (e1s, listelems1) (e2s, listelems2) + (* If one list is definitely empty and the other list definitely isn't *) + | [], [], _ :: _, _ -> false + | _ :: _, _, [], [] -> false + (* Else, can't tell *) + | _, _, _, _ -> false + +(* Errors *) + +let error at msg = Error.error at "else removal" msg + +let unary_mixfix : mixop = Xl.Mixop.Arg () + +(* Generates a fresh name if necessary, and goes up to a maximum which then it will return an error*) +let generate_next_rule_name ids rule = + let start = 0 in + let max = 100 in + let rec go id c = + if max <= c then error rule.at "Reached max variable generation" else + let name = id ^ "_" ^ Int.to_string c in + if (StringSet.mem name ids) + then go id (c + 1) + else name + in + (match rule.it with + | RuleD (id, quants, mixop, exp, prems) -> RuleD (go id.it start $ id.at, quants, mixop, exp, prems) + ) $ rule.at + +let is_else prem = prem.it = ElsePr + +let get_rule_id rule = + match rule.it with + | RuleD (id, _, _, _, _) -> id.it + +let replace_else aux_name lhs prem = match prem.it with + | ElsePr -> NegPr (RulePr (aux_name, [], unary_mixfix, lhs) $ prem.at) $ prem.at + | _ -> prem + +let unarize rule = match rule.it with + | RuleD (rid, quants, _mixop, exp, prems) -> + let lhs = match exp.it with + | TupE [lhs; _] -> lhs + | _ -> error exp.at "expected manifest pair" + in + { rule with it = RuleD (rid, quants, unary_mixfix, lhs, prems) } + +let not_apart lhs rule = match rule.it with + | RuleD (_, _, _, lhs2, _) -> not (apart lhs lhs2) + +let generate_else_rel_hint rel_id at: hint = { hintid = else_relation_hint_id $ at; hintexp = El.Ast.TextE rel_id.it $ at} + +let rec go hint_map used_names at id mixop typ typ1 prev_rules : rule list -> def list = function + | [] -> [ RelD (id, [], mixop, typ, List.rev prev_rules) $ at ] + | r :: rules -> match r.it with + | RuleD (rid, quants, rmixop, exp, prems) -> + if List.exists is_else prems + then + let lhs = match exp.it with + | TupE [lhs; _] -> lhs + | _ -> error exp.at "expected manifest pair" + in + let aux_name = id.it ^ "_before_" ^ rid.it $ rid.at in + let applicable_prev_rules = prev_rules + |> List.map unarize + |> List.filter (not_apart lhs) + |> List.map (generate_next_rule_name used_names) + in + let ids_used = applicable_prev_rules + |> List.map get_rule_id + |> StringSet.of_list + in + if applicable_prev_rules = [] then (error id.at "Could not find any applicable rule") + else + [ RelD (aux_name, [], unary_mixfix, typ1, applicable_prev_rules) $ r.at ] @ + let extra_hintdef = match (StringMap.find_opt id.it hint_map) with + | Some hints -> [ HintD (RelH (aux_name, generate_else_rel_hint id at :: hints) $ at) $ at ] + | _ -> [ HintD (RelH (aux_name, [generate_else_rel_hint id at]) $ at) $ at ] + in + let prems' = List.map (replace_else aux_name lhs) prems in + let rule' = { r with it = RuleD (rid, quants, rmixop, exp, prems') } in + extra_hintdef @ + go hint_map (StringSet.union ids_used used_names) at id mixop typ typ1 (rule' :: prev_rules) rules + else + go hint_map used_names at id mixop typ typ1 (r :: prev_rules) rules + +let rec t_def (hint_map : (hint list) StringMap.t) (def : def) : def list = match def.it with + | RecD defs -> [ { def with it = RecD (List.concat_map (t_def hint_map) defs) } ] + | RelD (id, [], mixop, typ, rules) -> begin match typ.it with + | TupT [(_exp1, typ1); (_exp2, _typ2)] -> + go hint_map StringSet.empty def.at id mixop typ typ1 [] rules + | _ -> [ def ] + end + | _ -> [ def ] + +(* Put more valid hints if needed *) +let valid_hint (hint : hint) : bool = + hint.hintid.it = "prefix" + +let collect_hints (hint_map : (hint list) StringMap.t ref) (def : def) : unit = + match def.it with + | HintD {it = RelH (id, hints); _} -> + let applicable_hints = List.filter valid_hint hints in + if applicable_hints = [] then () else + hint_map := StringMap.add id.it applicable_hints !hint_map + | _ -> () + +let transform (defs : script) = + let hint_map = ref StringMap.empty in + env_ref := Il.Env.env_of_script defs; + List.iter (collect_hints hint_map) defs; + List.concat_map (t_def !hint_map) defs \ No newline at end of file diff --git a/spectec/src/middlend/else.mli b/spectec/src/middlend/else.mli new file mode 100644 index 0000000000..b684bb28aa --- /dev/null +++ b/spectec/src/middlend/else.mli @@ -0,0 +1,22 @@ +(* +This transformation removes uses of the `otherwise` (`ElsePr`) premise from +inductive relations. + +It only supports binary relations. + +1. It figures out which rules are meant by “otherwise”: + + * All previous rules + * Excluding those that definitely can’t apply when the present rule applies + (decided by a simple and conservative comparision of the LHS). + +2. It creates an auxillary inductive unary predicate with these rules (LHS only). + * Note that these rules will be applied a simple naming scheme (just adding a number in front of it) + For now to resolve naming + +3. It replaces the `ElsePr` with the negation of that rule. + +*) + +val else_relation_hint_id: string +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/elsesimp.ml b/spectec/src/middlend/elsesimp.ml new file mode 100644 index 0000000000..3a375bdf49 --- /dev/null +++ b/spectec/src/middlend/elsesimp.ml @@ -0,0 +1,173 @@ +open Il.Ast +open Util.Source +open Util +open Il + +module StringMap = Map.Make(String) +module StringSet = Set.Make(String) + +type env = +{ + il_env : Il.Env.t; + mutable rel_to_else_map : text list StringMap.t; + mutable else_set_to_remove : StringSet.t; + mutable wf_relations : StringSet.t +} + +let new_env il = { + il_env = Il.Env.env_of_script il; + rel_to_else_map = StringMap.empty; + else_set_to_remove = StringSet.empty; + wf_relations = StringSet.empty +} + +let is_else_rel_hint hint = hint.hintid.it = Else.else_relation_hint_id +let is_wf_rel_hint hint = hint.hintid.it = Undep.wf_hint_id + +let bind_else_set env id = + env.else_set_to_remove <- StringSet.add id env.else_set_to_remove + +let register_else_rel env id base_rel_id = + env.rel_to_else_map <- StringMap.update base_rel_id (fun opt -> + match opt with + | Some ids -> Some (id.it :: ids) + | _ -> Some [id.it] + ) env.rel_to_else_map + +let register_wf_rel env id = + env.wf_relations <- StringSet.add id.it env.wf_relations + +let rec register_hints env (def : def) = + match def.it with + | HintD {it = RelH (id, hints); _} when List.exists is_wf_rel_hint hints -> + register_wf_rel env id + | HintD {it = RelH (id, hints); _} when List.exists is_else_rel_hint hints -> + begin match List.find_opt is_else_rel_hint hints with + | Some {hintexp = { it = TextE rel_id; _}; _} -> + register_else_rel env id rel_id + | _ -> () + end + | RecD defs -> List.iter (register_hints env) defs + | _ -> () + +let (let*) = Option.bind + +let is_boolean_prem prem = + match prem.it with + | IfPr _ -> true + (* | IterPr (p, _) -> is_boolean_prem p *) + | _ -> false + +let neg_cmpop cmpop = + match cmpop with + | `LeOp -> `GtOp + | `GtOp -> `LeOp + | `GeOp -> `LtOp + | `LtOp -> `GeOp + | `EqOp -> `NeOp + | `NeOp -> `EqOp + +let rec neg_exp exp = + { exp with it = + match exp.it with + | CmpE (cmpop, optyp, e1, e2) -> CmpE (neg_cmpop cmpop, optyp, e1, e2) + | BinE (`AndOp, optyp, e1, e2) -> BinE (`OrOp, optyp, neg_exp e1, neg_exp e2) + | BinE (`OrOp, optyp, e1, e2) -> BinE (`AndOp, optyp, neg_exp e1, neg_exp e2) + | UnE (`NotOp, _, e1) -> e1.it + | _ -> UnE (`NotOp, `BoolT, exp) + } + +let get_exp prem = + match prem.it with + | IfPr exp -> Some (neg_exp exp) + | _ -> None + +let is_wf_or_neg_prem else_ids env prem = + match prem.it with + | RulePr (id, _, _, _) -> StringSet.mem id.it env.wf_relations + | NegPr { it = RulePr (id, _, _, _); _} -> List.mem id.it else_ids + | _ -> false + +let is_neg_prem else_ids prem = + match prem.it with + | NegPr { it = RulePr (id, _, _, _); _} -> List.mem id.it else_ids + | _ -> false + +let is_in_quant (free_sets : Free.sets) q = + match q.it with + | ExpP (id, _) -> Free.Set.mem id.it free_sets.varid + | TypP id -> Free.Set.mem id.it free_sets.typid + | DefP (id, _, _) -> Free.Set.mem id.it free_sets.defid + | GramP (id, _, _) -> Free.Set.mem id.it free_sets.gramid + +let t_rule env else_ids rule = + let RuleD (id, quants, m, exp, prems) = rule.it in + let* else_id = List.find_opt (fun id -> List.exists (is_neg_prem [id]) prems) else_ids in + let* else_relation = Il.Env.find_opt_rel env.il_env (else_id $ no_region) in + let (_, _, _, rules) = else_relation in + let free_vars_binds = Free.free_list Free.bound_quant quants in + let free_vars_exp = Free.free_exp exp in + let prems_list, binds' = List.map (fun r -> + let RuleD (_, quants', _, _, prems') = r.it in + let free_vars = Free.diff (Free.free_list Free.free_prem prems') free_vars_binds in + Lib.List.filter_not (is_wf_or_neg_prem else_ids env) prems', List.filter (is_in_quant free_vars) quants' + ) rules |> List.split in + let quants' = List.concat binds' in + + (* First check that there are indeed premises, and that they are all boolean premises *) + if prems_list = [] || not (List.for_all (fun prems' -> List.for_all is_boolean_prem prems') prems_list) then None else + (* Then check that the quants actually appear in the conclusion (If they don't, then quantification changes!) *) + if not (List.for_all (is_in_quant free_vars_exp) quants') then None else + + let neg_exps = List.filter_map (fun prems' -> + let exps = List.filter_map get_exp prems' in + match exps with + | [] -> None + | x :: xs -> + Some (List.fold_left (fun acc exp -> BinE (`OrOp, `BoolT, acc, exp) $$ x.at % (BoolT $ x.at)) x xs) + ) prems_list in + let new_prems = List.map (fun e -> IfPr e $ e.at) neg_exps in + bind_else_set env else_id; + Some { rule with it = RuleD (id, quants @ quants', m, exp, new_prems @ Lib.List.filter_not (is_neg_prem else_ids) prems) } + +let rec t_def env d = + {d with it = + match d.it with + | RelD (id, qs, m, typ, rules) when StringMap.mem id.it env.rel_to_else_map -> + let else_ids = StringMap.find id.it env.rel_to_else_map in + RelD (id, qs, m, typ, List.map (fun r -> match (t_rule env else_ids r) with + | None -> r + | Some r' -> r' + ) rules) + | RecD defs -> RecD (List.map (t_def env) defs) + | d' -> d' + } + +let is_part_of_else_set env d = + match d.it with + | RelD (id, _, _, _, _) -> StringSet.mem id.it env.else_set_to_remove + | _ -> false + +let filter_else_set env: (module Iter.Arg) = + let module Arg = + struct + include Iter.Skip + let visit_prem prem = + match prem.it with + | RulePr (id, _, _, _) when StringSet.mem id.it env.else_set_to_remove -> + env.else_set_to_remove <- StringSet.remove id.it env.else_set_to_remove + | _ -> () + end + in (module Arg) + +let transform defs = + let env = new_env defs in + List.iter (register_hints env) defs; + let defs' = List.map (t_def env) defs in + let (module Arg) = filter_else_set env in + let module Acc = Iter.Make(Arg) in + (* Remove still existing else relations from set*) + List.iter Acc.def defs'; + (* Filter out remaining else relations *) + Lib.List.filter_not (is_part_of_else_set env) defs' + diff --git a/spectec/src/middlend/elsesimp.mli b/spectec/src/middlend/elsesimp.mli new file mode 100644 index 0000000000..970ebc1418 --- /dev/null +++ b/spectec/src/middlend/elsesimp.mli @@ -0,0 +1,57 @@ +(* +This pass is towards a better representation of otherwise when the only concern are boolean premises. +This simply takes the original premises of the generated relations and negates them. + +The pass performs the following steps: +- It collects all of the generated relations from the otherwise removal pass (#187) + and makes a mapping (original relation -> generated relations). +- It then goes through each rule of the original relation and checks if there + is a negated relational premise. +- If there is, then we grab the boolean premises of the generated relation and negate them. + +Some restrictions of this pass: +- If any premise contains a quantifier that was not present in the original rule's + conclusion (the one that had the otherwise), then we do not simplify it. + This is due to the quantification being flipped when negating the premise. +- Only works for boolean premises. (Iterated boolean premises would again flip quantification) + +Example: + +relation Step_pure: admininstr* ~> admininstr* +rule Step_pure/br_if-true: + (CONST I32 c) (BR_IF l) ~> (BR l) + -- if c =/= 0 + +rule Step_pure/br_if-false: + (CONST I32 c) (BR_IF l) ~> eps + -- otherwise + +From else pass (omitting wf premises): + +relation `Step_pure_before_br_if-false`: `%`(admininstr* ) + rule `br_if-true_0`{c : val_, l : labelidx}: + `%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)]) + -- if (!($proj_val__0(c))!`%`_uN.0 =/= 0) + +relation Step_pure: `%~>%`(admininstr*, admininstr* ) + rule `br_if-true`{c : val_, l : labelidx}: + `%~>%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)], [BR_admininstr(l)]) + -- if (!($proj_val__0(c))!`%`_uN.0 =/= 0) + + rule `br_if-false`{c : val_, l : labelidx}: + `%~>%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)], []) + -- ~ `Step_pure_before_br_if-false`: `%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)]) + +From else simplification pass: + +relation Step_pure: `%~>%`(admininstr*, admininstr* ) + rule `br_if-true`{c : val_, l : labelidx}: + `%~>%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)], [BR_admininstr(l)]) + -- if (!($proj_val__0(c))!`%`_uN.0 =/= 0) + + rule `br_if-false`{c : val_, l : labelidx}: + `%~>%`([CONST_admininstr(I32_valtype, c) BR_IF_admininstr(l)], []) + -- if (!($proj_val__0(c))!`%`_uN.0 = 0) +*) + +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/improveids.ml b/spectec/src/middlend/improveids.ml new file mode 100644 index 0000000000..f7be3f8c4e --- /dev/null +++ b/spectec/src/middlend/improveids.ml @@ -0,0 +1,207 @@ +open Il.Ast +open Il +open Il.Walk +open Util.Source +(* open Util *) +open Xl.Atom + +module StringMap = Map.Make(String) +module StringSet = Set.Make(String) + +type env = { + mutable atom_str_set : StringSet.t; + il_env : Il.Env.t; +} + +let make_prefix = "mk_" +let var_prefix = "v_" +let fun_prefix = "fun_" +let res_prefix = "r_" + +type id_type = + | VAR (* Variables *) + | USERDEF (* Types, type constructors and relations *) + | FUNCDEF (* function definitions *) + +let empty_info: region * Xl.Atom.info = (no_region, {def = ""; case = ""}) + +let reduce_typ env typ = + let Ok typ' | Error typ' = Eval.reduce_typ env typ in typ' + +(* Id transformation *) +let rec transform_id' (env : env) (id_type : id_type) (s : text) = + let t_func = transform_id' env id_type in + let change_id s' = + String.map (function + | '.' -> '_' + | '-' -> '_' + | c -> c + ) s' + (* This suffixes any '*' with '_lst' and '?' with '_opt' for clarity *) + |> Str.global_replace (Str.regexp {|\(*\)|}) "_lst" + |> Util.Lib.String.replace "?" "_opt" + in + let s' = change_id s in + match id_type with + (* Leave naming hole as is *) + | _ when s' = "_" -> s' + | VAR when Il.Env.mem_typ env.il_env (s' $ no_region) + || Il.Env.mem_rel env.il_env (s' $ no_region) + || Il.Env.mem_def env.il_env (s' $ no_region) + || StringSet.mem s' env.atom_str_set -> t_func (var_prefix ^ s') + | FUNCDEF when Il.Env.mem_typ env.il_env (s' $ no_region) + || Il.Env.mem_rel env.il_env (s' $ no_region) + || StringSet.mem s' env.atom_str_set -> t_func (fun_prefix ^ s') + (* Checking whether an id is an int - if so, put a reserved prefix *) + | _ when Option.is_some (int_of_string_opt s') -> t_func (res_prefix ^ s') + | _ -> s' + +let t_var_id env id = transform_id' env VAR id.it $ id.at +let t_def_id env id = transform_id' env FUNCDEF id.it $ id.at +let t_user_def_id env id = transform_id' env USERDEF id.it $ id.at +let transform_rule_id env rule_id rel_id = + match rule_id.it with + | "" -> make_prefix ^ rel_id.it + | _ -> transform_id' env USERDEF rule_id.it + +let is_atomid a = + match a.it with + | Atom _ -> true + | _ -> false + +let has_atom_hole m = + match m with + | [{it = Atom "_"; _}] -> true + | _ -> false + +(* Atom functions *) +let transform_atom env typ_id a = + match a.it with + | Atom s -> Atom (t_user_def_id env (s $ a.at)).it $$ a.at % a.note + | _ -> Atom (make_prefix ^ typ_id) $$ a.at % a.note + +let transform_mixop env typ_id (m : mixop) = +(* TODO! Not sure what the expected result is for this one. *) +ignore (env, typ_id, empty_info, is_atomid, has_atom_hole, transform_atom); m +(* + let m' = List.map (fun inner_m -> List.filter is_atomid inner_m) m in + let len = List.length m' in + match m' with + | _ when List.for_all (fun l -> l = [] || has_atom_hole l) m' -> [(Atom (make_prefix ^ typ_id) $$ empty_info)] :: List.init (len - 1) (fun _ -> []) + | _ -> Xl.Mixop.map_atoms (transform_atom env typ_id)) m' +*) + +let rec check_iteration_naming e iterexp = + match e.it, iterexp with + | VarE id, (_, [(id', _)]) -> Eq.eq_id id id' + | IterE (e, ((_, [(_, {it = VarE id; _})]) as i)), (_, [(id', _)]) -> + Eq.eq_id id id' && check_iteration_naming e i + | _ -> false + +and t_typ env t = + (match t.it with + | VarT (id, []) when not (Env.mem_typ env.il_env id) -> + (* Type parameter - treat it as such *) + VarT (t_var_id env id, []) + | typ -> typ + ) $ t.at + +and t_exp env e = + (match e.it with + | CaseE (m, e1, ch) -> + let id = Print.string_of_typ_name (reduce_typ env.il_env e.note) in + CaseE(transform_mixop env id m, e1, ch) + | StrE (fields, ch) -> + let id = Print.string_of_typ_name (reduce_typ env.il_env e.note) in + StrE (List.map (fun (a, e1) -> (transform_atom env id a, e1)) fields, ch) + | UncaseE (e1, m) -> + let id = Print.string_of_typ_name (reduce_typ env.il_env e.note) in + UncaseE (e1, transform_mixop env id m) + | DotE (e1, a) -> + let id = Print.string_of_typ_name (reduce_typ env.il_env e1.note) in + DotE (e1, transform_atom env id a) + (* Special case for iteration naming - just use the variable it is iterating on *) + | IterE (e, ((_, [(_, {it = VarE id''; _})]) as iterexp)) when check_iteration_naming e iterexp -> + VarE (t_var_id env id'') + | exp -> exp + ) $$ e.at % e.note + +and t_path env path = + (match path.it with + | DotP (p, a) -> + let id = Print.string_of_typ_name (reduce_typ env.il_env p.note) in + DotP (p, transform_atom env id a) + | p -> p + ) $$ path.at % path.note + +let t_inst tf env id inst = + (match inst.it with + | InstD (quants, args, deftyp) -> InstD (List.map (transform_param tf) quants, List.map (transform_arg tf) args, + (match deftyp.it with + | AliasT typ -> AliasT (transform_typ tf typ) + | StructT typfields -> StructT (List.map (fun (a, (typ, c_quants, prems), hints) -> + (transform_atom env id.it a, + (transform_typ tf typ, List.map (transform_param tf) c_quants, List.map (transform_prem tf) prems), hints) + ) typfields) + | VariantT typcases -> + VariantT (List.map (fun (m, (typ, c_quants, prems), hints) -> + (transform_mixop env id.it m, + (transform_typ tf typ, List.map (transform_param tf) c_quants, List.map (transform_prem tf) prems), hints) + ) typcases) + ) $ deftyp.at + ) + ) $ inst.at + +let transform_rule tf env rel_id rule = + (match rule.it with + | RuleD (id, quants, m, exp, prems) -> + RuleD (transform_rule_id env id rel_id $ id.at, + List.map (transform_param tf) quants, + m, + transform_exp tf exp, + List.map (transform_prem tf) prems + ) + ) $ rule.at + +let rec t_def env def = + let tf = { base_transformer with + transform_exp = t_exp env; + transform_typ = t_typ env; + transform_path = t_path env; + transform_var_id = t_var_id env; + transform_typ_id = t_user_def_id env; + transform_rel_id = t_user_def_id env; + transform_def_id = t_def_id env; + } in + (match def.it with + | TypD (id, params, insts) -> + TypD (t_user_def_id env id, + List.map (transform_param tf) params |> Utils.improve_ids_params, + List.map (t_inst tf env id) insts) + | RelD (id, params, m, typ, rules) -> + RelD (t_user_def_id env id, + List.map (transform_param tf) params |> Utils.improve_ids_params, + m, transform_typ tf typ, + List.map (transform_rule tf env id) rules) + | DecD (id, params, typ, clauses) -> + DecD (t_def_id env id, + List.map (transform_param tf) params |> Utils.improve_ids_params, + transform_typ tf typ, + List.map (transform_clause tf) clauses) + | GramD (id, params, typ, prods) -> + GramD (id, + List.map (transform_param tf) params |> Utils.improve_ids_params, + transform_typ tf typ, + List.map (transform_prod tf) prods) + | RecD defs -> RecD (List.map (t_def env) defs) + | HintD hintdef -> HintD hintdef + ) $ def.at + +let create_env il = { + atom_str_set = StringSet.empty; + il_env = Env.env_of_script il +} + +let transform (il : script): script = + let env = create_env il in + List.map (t_def env) il \ No newline at end of file diff --git a/spectec/src/middlend/improveids.mli b/spectec/src/middlend/improveids.mli new file mode 100644 index 0000000000..eed6fb6d57 --- /dev/null +++ b/spectec/src/middlend/improveids.mli @@ -0,0 +1,17 @@ +(* + This pass simply ensures that there is no ambiguity between any names. + + It does this by creating a massive set of names, separated by the + different main constructs (i.e. TypD, RelD, DecD, etc.). + + It makes sure that variables don't have the same name as anything else, + as this could cause shadowing in some cases for ITPs. If it does have + the same name, then it adds the prefix "v_" until the name is unique. + + For functions, we unsure that they don't have the same name as + user-defined types and relations. If it does, then it adds the prefix + "fun_" until the name is unique. + +*) + +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/ite.ml b/spectec/src/middlend/ite.ml new file mode 100644 index 0000000000..b071889581 --- /dev/null +++ b/spectec/src/middlend/ite.ml @@ -0,0 +1,159 @@ +open Util +open Source +open Il.Ast + +(* Errors *) + +(* let error at msg = Error.error at "if-then-else introduction" msg *) + +(* Environment *) + +let env_ref = ref Il.Env.empty + +let rec typ_has_prems (pred : deftyp -> bool) typ = + match typ.it with + | VarT (id, _) -> + (match Il.Env.find_opt_typ !env_ref id with + | Some (_, insts) -> + List.exists (fun inst -> + let InstD (_, _, deftyp) = inst.it in + match deftyp.it with + | AliasT typ' -> typ_has_prems pred typ' + | _ -> pred deftyp + ) insts + | None -> true (* conservative *) + ) + | _ -> false + +let case_has_prems m deftyp = + match deftyp.it with + | VariantT typcases -> + List.exists (fun (m', (_, _, prems), _) -> + Il.Eq.eq_mixop m m' && prems <> [] + ) typcases + | _ -> false + +let struct_has_prems deftyp = + match deftyp.it with + | StructT typfields -> + List.exists (fun (_, (_, _, prems), _) -> prems <> []) typfields + | _ -> false + +let is_partial_constructor e = + match e.it with + | CaseE (m, _, Unchecked) -> typ_has_prems (case_has_prems m) e.note + | StrE (_, Unchecked) -> typ_has_prems struct_has_prems e.note + | _ -> false + +let prem_has_partial_constructor prem = + let c = { Il.Walk.exists_base_checker with + collect_exp = (fun e -> (is_partial_constructor e, true)) + } in + Il.Walk.collect_prem c prem + +let clause_has_partial_constructor clause = + match clause.it with + | DefD (_, _, _, prems) -> List.exists prem_has_partial_constructor prems + +let clauses_have_same_args c1 c2 = + match (c1.it, c2.it) with + | (DefD (quants1, args1, _, _), DefD (quants2, args2, _, _)) -> + Il.Eq.eq_list Il.Eq.eq_param quants1 quants2 && + Il.Eq.eq_list Il.Eq.eq_arg args1 args2 + +let group_clauses_by_same_args clauses = + let group_helper acc clause = + match acc with + | [] -> [[clause]] + | group :: rest -> + let representative = List.hd group in + if clauses_have_same_args representative clause then + (group @ [clause]) :: rest + else + [clause] :: group :: rest + in + List.fold_left group_helper [] clauses |> List.rev + +let is_else_premise prem = + match prem.it with + | ElsePr -> true + | _ -> false + +let has_only_else_premise clause = + match clause.it with + | DefD (_, _, _, ([_] as prems)) -> + List.for_all is_else_premise prems + | _ -> false + +let mk_and : exp -> exp -> exp = fun e1 e2 -> + BinE (`AndOp, `BoolT, e1, e2) $$ (no_region, BoolT $ no_region) + +let rec prem_to_bool_exp (prem : prem) : exp option = + match prem.it with + | IfPr exp -> Some exp + | NegPr prem' -> + Option.bind (prem_to_bool_exp prem') (fun exp -> + Some (UnE (`NotOp, `BoolT, exp) $$ (prem.at, BoolT $ no_region))) + | _ -> None + +and prems_to_bool_exp = function + | [] -> Some (BoolE true $$ (no_region, BoolT $ no_region)) + | [prem] -> prem_to_bool_exp prem + | prem :: rest -> + Option.bind (prem_to_bool_exp prem) (fun exp1 -> + Option.bind (prems_to_bool_exp rest) (fun exp2 -> + Some (mk_and exp1 exp2) + ) + ) + +let clause_prems_to_bool_exp (clause : clause) : exp option = + match clause.it with + | DefD (_, _, _, prems) -> + prems_to_bool_exp prems + +let mk_if (cond : exp) (then_exp : exp) (else_exp : exp) : exp = + IfE (cond, then_exp, else_exp) $$ (no_region, then_exp.note) + +let rec t_clause_group_to_expr (clauses : clause list) : exp option = + match clauses with + | [] -> None + | [clause] -> + if has_only_else_premise clause then + match clause.it with + | DefD (_, _, rhs, _) -> Some rhs + else + None + | clause :: rest_clauses -> + match clause_prems_to_bool_exp clause with + | None -> None + | Some cond -> + match clause.it with + | DefD (_, _, rhs, _) -> + match t_clause_group_to_expr rest_clauses with + | None -> None + | Some else_exp -> Some (mk_if cond rhs else_exp) + +let t_clause_group (clauses : clause list) : clause list = + if List.exists clause_has_partial_constructor clauses then clauses else + match t_clause_group_to_expr clauses with + | None -> clauses + | Some exp -> + let rep = List.hd clauses in + let DefD (quants, args, _rhs, _prems) = rep.it in + [{ rep with it = DefD (quants, args, exp, []) }] + + +let t_clauses clauses = + List.concat_map t_clause_group (group_clauses_by_same_args clauses) + +let rec t_def (def : def) : def = { def with it = t_def' def.it } +and t_def' = function + | RecD defs -> + RecD (List.map t_def defs) + | DecD (id, params, typ, clauses) -> + DecD (id, params, typ, t_clauses clauses) + | def -> def + +let transform (defs : script) : script = + env_ref := Il.Env.env_of_script defs; + List.map t_def defs diff --git a/spectec/src/middlend/ite.mli b/spectec/src/middlend/ite.mli new file mode 100644 index 0000000000..7ce7114e3b --- /dev/null +++ b/spectec/src/middlend/ite.mli @@ -0,0 +1,6 @@ +(* +This pass recongizes when multiple subsequent clauses of a definition share the pattern and have +only boolean premises, and rewrites that to a single clause using if-then-else on the right-hand side. +*) + +val transform : Il.Ast.script -> Il.Ast.script \ No newline at end of file diff --git a/spectec/src/middlend/letintromech.ml b/spectec/src/middlend/letintromech.ml new file mode 100644 index 0000000000..8fbe7aed0d --- /dev/null +++ b/spectec/src/middlend/letintromech.ml @@ -0,0 +1,91 @@ +open Il.Ast +open Util.Source +open Il +open Il.Walk + +let construct_let_prem prev_free_vars quants exp1 exp2 at = + let free_vars = (Free.free_exp exp1).varid in + let let_quants, rest = List.partition (fun q -> match q.it with + | ExpP (id, _) -> Free.Set.mem id.it free_vars && not (Free.Set.mem id.it prev_free_vars) + | _ -> false + ) quants + in + LetPr (let_quants, exp1, exp2) $ at, rest + +let diff = Free.Set.diff +let union = Free.Set.union +let inter = Free.Set.inter +let empty = Free.Set.empty + +let valid_exp exp = + let get_id e = match e.it with + | VarE id -> Some id + | IterE (_, (_, [(_, {it = VarE id; _})])) -> Some id + | _ -> None + in + let continue = true in + let validity = + match exp.it with + | StrE _ + | CaseE _ + | VarE _ + | TupE _ -> true + | IterE (e, (iter, [(id, {it = VarE _; _})])) -> + iter <= List1 && + begin match (get_id e) with + | Some id' -> Il.Eq.eq_id id id' + | None -> false + end + | _ -> false + in + (validity, continue) + +let inferrable_exp exp = + let continue = true in + let validity = + match exp.it with + (* OptE (for some reason) and StrE can never have their types inferred *) + | OptE _ + | StrE _ -> false + | _ -> true + in + (validity, continue) + +let t_prems quants free_vars_start prems = + let valid_lhs_checker = { forall_base_checker with collect_exp = valid_exp } in + let valid_rhs_checker = { forall_base_checker with collect_exp = inferrable_exp } in + let (_, new_quants, new_prems) = List.fold_left ( fun (free, quants, prev_prems) p -> + let free_vars = (Free.free_prem p).varid in + match p.it with + | IfPr {it = CmpE (`EqOp, _, exp1, exp2); _} + when inter (Free.free_exp exp1).varid free = empty && + diff (Free.free_exp exp2).varid free = empty && + collect_exp valid_lhs_checker exp1 && + collect_exp valid_rhs_checker exp2 -> + let (p, new_quants) = construct_let_prem free quants exp1 exp2 p.at in + (union free free_vars, new_quants, p :: prev_prems) + | IfPr {it = CmpE (`EqOp, _, exp1, exp2); _} + when diff (Free.free_exp exp1).varid free = empty && + inter (Free.free_exp exp2).varid free = empty && + collect_exp valid_lhs_checker exp2 && + collect_exp valid_rhs_checker exp1 -> + let (p, new_quants) = construct_let_prem free quants exp2 exp1 p.at in + (union free free_vars, new_quants, p :: prev_prems) + | _ -> (union free free_vars, quants, p :: prev_prems) + ) (free_vars_start, quants, []) prems in + (List.rev new_prems, new_quants) + +let t_clause c = + let { it = DefD (quants, args, exp, prems); _} = c in + let free_vars = (Free.free_list Free.free_arg args).varid in + let (new_prems, new_quants) = t_prems quants free_vars prems in + { c with it = DefD (new_quants, args, exp, new_prems) } + +let rec t_def d = + match d.it with + | DecD (id, params, typ, clauses) -> + { d with it = DecD (id, params, typ, List.map t_clause clauses) } + | RecD defs -> RecD (List.map t_def defs) $ d.at + | _ -> d + +let transform defs = List.map t_def defs diff --git a/spectec/src/middlend/letintromech.mli b/spectec/src/middlend/letintromech.mli new file mode 100644 index 0000000000..5a3b76e328 --- /dev/null +++ b/spectec/src/middlend/letintromech.mli @@ -0,0 +1,48 @@ +(* +This pass goes through all list of premises, and if there is a LHS that has a + variable that has not been declared before, then it introduces a let premise. + +Due to this approach, this pass relies on the ordering of the premises. +Perhaps there is a way to remove this restriction but for now this naive approach should work fine. + +Valid LHS are: +VarE, StrE (records), CaseE, IterE (only allows identity iteration), TupE + +In the validator, there are some RHS that need to be inferred, but +some expressions are not possible to have their type inferred. + +So, the RHS not allowed are: +OptE, StrE + +For the most part, this works well. However due to some of the restrictions above, +(and uncaseE appearing in unfortunate locations) it sometimes just does not introduce the let premise. + +Example from Wasm 3.0: + +rec { +def $minus_recs(typevar*, typeuse*v) : (typevar*, typeuse* ) + def $minus_recs([], []) = ([], []) + def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) +} + +to + +rec { +def $minus_recs(typevar*, typeuse* ) : (typevar*, typeuse* ) + def $minus_recs([], []) = ([], []) + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + def $minus_recs{x : uN(32), `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- where (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) {tu', `tu'*`, tv', `tv'*`} +} + +Some limitations of this pass: +- The premise must be of the exact right shape (according to the valid LHS and RHS noted above) + and ordering to introduce lets. If it is not ordered properly, it leaves the if premise untouched. +- It does not try to do any dependency analysis nor does it introduce any new variables, + making it quite weak compared to Zilin's pass. Regardless, most if premises are in the + right shape so this should not introduce a problem. +*) + +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/sideconditions.ml b/spectec/src/middlend/sideconditions.ml index cf54bfaa26..9f593a80ed 100644 --- a/spectec/src/middlend/sideconditions.ml +++ b/spectec/src/middlend/sideconditions.ml @@ -1,20 +1,13 @@ -(* -This transformation make explicit the following implicit side conditions -of terms in premises and conclusions: - - * Array access a[i] i < |a| - * Joint iteration e*{v1,v2} |v1*| = |v2*| - * Option projection !(e) e =!= null - -(The option projection would probably be nicer by rewriting !(e) to a fresh -variable x and require e=?x. Maybe later.) -*) - open Util open Source open Il.Ast open Il.Free +open Il.Walk + + +(* Errors *) +let error at msg = Error.error at "sideconditions" msg (* Smart constructor for LenE that optimizes |x^n| into n *) let lenE e = match e.it with @@ -49,97 +42,53 @@ let iter_side_conditions _env ((iter, vs) : iterexp) : prem list = | ListN _, _ -> [] | _ -> [] +let is_eq_exp e = + match e.it with + | CmpE (`EqOp, _, _, _) -> true + | _ -> false + (* Expr traversal *) -let rec t_exp env e : prem list = - (* First the conditions to be generated here *) - begin match e.it with +let rec t_exp env e = + match e.it with | CvtE (_exp, t1, t2) when t1 > t2 -> - [] (* TODO *) + ([], true) (* TODO *) | IdxE (exp1, exp2) -> - [IfPr (CmpE (`LtOp, `NatT, exp2, LenE exp1 $$ e.at % exp2.note) $$ e.at % (BoolT $ e.at)) $ e.at] + ([IfPr (CmpE (`LtOp, `NatT, exp2, LenE exp1 $$ e.at % exp2.note) $$ e.at % (BoolT $ e.at)) $ e.at], true) | TheE exp -> - [IfPr (CmpE (`NeOp, `BoolT, exp, OptE None $$ e.at % exp.note) $$ e.at % (BoolT $ e.at)) $ e.at] - | IterE ({it= CmpE (`EqOp, _, _, _); _}, iterexp) -> iter_side_conditions env iterexp + ([IfPr (CmpE (`NeOp, `BoolT, exp, OptE None $$ e.at % exp.note) $$ e.at % (BoolT $ e.at)) $ e.at], true) | MemE (_exp, exp) -> - [IfPr (CmpE (`GtOp, `NatT, LenE exp $$ exp.at % (NumT `NatT $ exp.at), NumE (`Nat Z.zero) $$ no_region % (NumT `NatT $ no_region)) $$ e.at % (BoolT $ e.at)) $ e.at] - | _ -> [] - end @ - (* And now descend *) - match e.it with - | VarE _ | BoolE _ | NumE _ | TextE _ | OptE None - -> [] - | UnE (_, _, exp) - | LenE exp - | ProjE (exp, _) - | OptE (Some exp) - | TheE exp - | LiftE exp - | CvtE (exp, _, _) - | SubE (exp, _, _) - -> t_exp env exp - | BinE (_, _, exp1, exp2) - | CmpE (_, _, exp1, exp2) - | IdxE (exp1, exp2) - | CompE (exp1, exp2) - | MemE (exp1, exp2) - | CatE (exp1, exp2) - -> t_exp env exp1 @ t_exp env exp2 - | SliceE (exp1, exp2, exp3) - -> t_exp env exp1 @ t_exp env exp2 @ t_exp env exp3 - | UpdE (exp1, path, exp2) - | ExtE (exp1, path, exp2) - -> t_exp env exp1 @ t_path env path @ t_exp env exp2 - | CallE (_, args) - -> List.concat_map (t_arg env) args - | CaseE (_, exp, _) - | UncaseE (exp, _) - | DotE (exp, _) - -> t_exp env exp - | StrE (fields, _) - -> List.concat_map (fun (_, exp) -> t_exp env exp) fields - | TupE es | ListE es - -> List.concat_map (t_exp env) es - | IterE (e1, iterexp) + ([IfPr (CmpE (`GtOp, `NatT, LenE exp $$ exp.at % (NumT `NatT $ exp.at), NumE (`Nat Z.zero) $$ no_region % (NumT `NatT $ no_region)) $$ e.at % (BoolT $ e.at)) $ e.at], true) + | IterE (e1, ((iter, _) as iterexp)) -> - t_iterexp env iterexp @ let env' = env_under_iter env iterexp in - List.map (fun pr -> iterPr (pr, iterexp) $ e.at) (t_exp env' e1) - -and t_iterexp env (iter, _) = t_iter env iter - -and t_iter env = function - | ListN (e, _) -> t_exp env e - | _ -> [] - -and t_path env path = match path.it with - | RootP -> [] - | IdxP (path, e) -> t_path env path @ t_exp env e - | SliceP (path, e1, e2) -> t_path env path @ t_exp env e1 @ t_exp env e2 - | DotP (path, _) -> t_path env path - -and t_arg env arg = match arg.it with - | ExpA exp -> t_exp env exp - | TypA _ -> [] - | DefA _ -> [] - | GramA _ -> [] - - -let rec t_prem env prem = - (match prem.it with - | RulePr (_, args, _, exp) -> List.concat_map (t_arg env) args @ t_exp env exp - | IfPr e -> t_exp env e - | LetPr (qs, e1, e2) -> - let env' = Il.Env.env_of_params env qs in - t_exp env' e1 @ t_exp env' e2 - | ElsePr -> [] - | IterPr (prem, iterexp) - -> iter_side_conditions env iterexp @ - t_iterexp env iterexp @ - let env' = env_under_iter env iterexp in - List.map (fun pr -> iterPr (pr, iterexp) $ prem.at) (t_prem env' prem) - ) @ [prem] - -let t_prems env = List.concat_map (t_prem env) + let collector1 = create_collector env in + let collector2 = create_collector env' in + let iter_prems = if is_eq_exp e1 then iter_side_conditions env iterexp else [] in + ( + iter_prems @ + collect_iter collector1 iter @ + List.map (fun pr -> iterPr (pr, iterexp) $ e.at) (collect_exp collector2 e1), false) + | _ -> ([], true) +and t_prem env prem = + let res, continue = (match prem.it with + | IterPr (prem', ((iter, _) as iterexp)) + -> + let env' = env_under_iter env iterexp in + let collector1 = create_collector env in + let collector2 = create_collector env' in + (iter_side_conditions env iterexp @ + collect_iter collector1 iter @ + List.map (fun pr -> iterPr (pr, iterexp) $ prem'.at) (collect_prem collector2 prem' @ [prem']), false) + | NegPr _ -> + (* We do not want to infer anything from NegPr *) + ([], false) + | _ -> ([], true) + ) in + res, continue + +and create_collector env = + let base_prem_collector: prem list collector = base_collector [] (@) in + { base_prem_collector with collect_exp = t_exp env; collect_prem = t_prem env } let is_true_exp env e = match Il.Eval.reduce_exp env e with @@ -174,13 +123,21 @@ let reduce_prems env prems = prems |> Util.Lib.List.filter_not (is_true_prem env) |> Util.Lib.List.nub implies +let t_params env = + List.fold_left (fun env param -> + match param.it with + | ExpP (v, t) -> Il.Env.bind_var env v t + | TypP _ | DefP _ | GramP _ -> error param.at "unexpected paramater or quantifier in rule" + ) env + let t_rule' env = function - | RuleD (id, params, mixop, exp, prems) -> - let env' = Il.Env.env_of_params env params in - let prems' = t_prems env' prems in - let extra_prems = t_exp env' exp in + | RuleD (id, quants, mixop, exp, prems) -> + let env' = t_params env quants in + let collector = create_collector env' in + let prems' = List.concat_map (fun prem -> collect_prem collector prem @ [prem]) prems in + let extra_prems = collect_exp collector exp in let reduced_prems = reduce_prems env (extra_prems @ prems') in - RuleD (id, params, mixop, exp, reduced_prems) + RuleD (id, quants, mixop, exp, reduced_prems) let t_rule env x = { x with it = t_rule' env x.it } @@ -198,4 +155,3 @@ and t_def env x = { x with it = t_def' env x.it } let transform (defs : script) = let env = Il.Env.env_of_script defs in List.map (t_def env) defs - diff --git a/spectec/src/middlend/sideconditions.mli b/spectec/src/middlend/sideconditions.mli index 542bbf8052..6de2d47746 100644 --- a/spectec/src/middlend/sideconditions.mli +++ b/spectec/src/middlend/sideconditions.mli @@ -1 +1,13 @@ +(* +This transformation make explicit the following implicit side conditions +of terms in premises and conclusions: + + * Array access a[i] i < |a| + * Joint iteration e*{v1,v2} |v1*| = |v2*| + * Option projection !(e) e =!= null + +(The option projection would probably be nicer by rewriting !(e) to a fresh +variable x and require e=?x. Maybe later.) +*) + val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/sub.ml b/spectec/src/middlend/sub.ml index 6a49104318..c4842d5848 100644 --- a/spectec/src/middlend/sub.ml +++ b/spectec/src/middlend/sub.ml @@ -1,30 +1,7 @@ -(* -This transformation replaces SubE expressions with explicit subtype injection -functions. - - 1. It traverses all expressions and finds out which type pairs - occur in SubE expressions - - all type pairs mentioned in SubE expressions - - for all variant types: list of constructors - - for all alias types: right hand side of the alias - - 2. It traverses all definitions to collect information about variant types and - type aliases (assuming only such types occur in type aliases). - - 3. It generates explicit injection functions for pairs, and put them in the - right spot (after both types are defined, but outside `RecD` groups) - - 4. It replaces occurrences of SubE with a suitable CallE - -Step 1 and 4 are done together, and step 2 and 3 - -This pass assumes that there is no name shadowing in the type definitions. - -*) - open Util open Source open Il.Ast +open Il.Walk (* Errors *) @@ -42,15 +19,18 @@ end) The environment consist of: * Which constructors the type has (and their non-aliased concrete type) * Which SubE type pairs have been observed, but not yet generated + * Flag that allows the SubE type pairs set to be modified. *) type env = { mutable typ : (param list * id * arg list * typcase list) M.t; - mutable pairs : S.t + mutable pairs : S.t; + mutable pairs_mutable : bool } let new_env () : env = { typ = M.empty; pairs = S.empty; + pairs_mutable = true } let lookup (env : env) (id : id) : param list * id * arg list * typcase list = @@ -91,182 +71,37 @@ let register_alias (env : env) (id : id) params (id2 : id) args = let injection_name (sub : id) (sup : id) = sup.it ^ "_" ^ sub.it $ no_region -let var_of_typ typ = match typ.it with - | VarT (id, args) -> Some (id, args) - | NumT _ -> None - | _ -> error typ.at ("Non-variable or number type expression not supported `" ^ Il.Print.string_of_typ typ ^ "`") - (* Step 1 and 4: Collect SubE occurrences, and replace with function *) (* The main transformation case *) let rec t_exp env exp = - let exp' = t_exp2 env exp in - match exp'.it with + match exp.it with | SubE (e, sub_ty, sup_ty) -> -(Printf.eprintf "[sub @ %s] %s <: %s\n%!" (string_of_region exp'.at) (Il.Print.string_of_typ sub_ty) (Il.Print.string_of_typ sup_ty); - begin match var_of_typ sub_ty, var_of_typ sup_ty with - | Some (sub, args_sub), Some (sup, args_sup) -> - env.pairs <- S.add (sub, sup) env.pairs; - { exp' with it = CallE (injection_name sub sup, args_sub @ args_sup @ [ExpA e $ e.at])} +( +(* Printf.eprintf "[sub @ %s] %s <: %s\n%!" (string_of_region exp'.at) (Il.Print.string_of_typ sub_ty) (Il.Print.string_of_typ sup_ty); *) + begin match sub_ty.it, sup_ty.it with + | VarT (sub, args_sub), VarT (sup, args_sup) -> + if env.pairs_mutable then + env.pairs <- S.add (sub, sup) env.pairs; + { exp with it = CallE (injection_name sub sup, args_sub @ args_sup @ [ExpA (t_exp env e) $ e.at])} + | NumT _, NumT _ -> exp + | TupT ts, TupT ts' when List.length ts = List.length ts' -> + TupE (List.mapi (fun idx ((_, t), (_, t')) -> + let proj_exp = ProjE (e, idx) $$ e.at % t in + if Il.Eq.eq_typ t t' then proj_exp else + t_exp env (SubE (proj_exp, t, t') $$ exp.at % t') + ) (List.combine ts ts')) $$ exp.at % sup_ty + | IterT (t1, iter1), IterT (t2, iter2) when Il.Eq.eq_iter iter1 iter2 -> + let new_iterid = Il.Fresh.fresh_varid "iter_val" in + let new_exp = VarE (new_iterid $ e.at) $$ e.at % t1 in + let new_iterexp = (iter1, [(new_iterid $ e.at, e)]) in + IterE (SubE (new_exp, t1, t2) $$ e.at % t2, new_iterexp) $$ e.at % sup_ty | _, _ -> -Printf.eprintf "[sub @ %s REMAINS] %s <: %s\n%!" (string_of_region exp'.at) (Il.Print.string_of_typ sub_ty) (Il.Print.string_of_typ sup_ty); - exp' +(* Printf.eprintf "[sub @ %s REMAINS] %s <: %s\n%!" (string_of_region exp'.at) (Il.Print.string_of_typ sub_ty) (Il.Print.string_of_typ sup_ty); *) + error sub_ty.at ("Non-variable or number type expression not supported `" ^ Il.Print.string_of_typ sub_ty ^ "`") end ) - | _ -> exp' - -(* Traversal boilerplate *) - -and t_typ env x = { x with it = t_typ' env x.it } - -and t_typ' env = function - | VarT (id, args) -> VarT (id, t_args env args) - | (BoolT | NumT _ | TextT) as t -> t - | TupT xts -> TupT (List.map (fun (id, t) -> (id, t_typ env t)) xts) - | IterT (t, iter) -> IterT (t_typ env t, iter) - -and t_deftyp env x = { x with it = t_deftyp' env x.it } - -and t_deftyp' env = function - | AliasT t -> AliasT (t_typ env t) - | StructT typfields -> StructT (List.map (t_typfield env) typfields) - | VariantT typcases -> VariantT (List.map (t_typcase env) typcases) - -and t_typfield env (atom, (t, quants, prems), hints) = - (atom, (t_typ env t, t_params env quants, t_prems env prems), hints) -and t_typcase env (atom, (t, quants, prems), hints) = - (atom, (t_typ env t, t_params env quants, t_prems env prems), hints) - -and t_exp2 env x = { x with it = t_exp' env x.it; note = t_typ env x.note } - -and t_exp' env = function - | (VarE _ | BoolE _ | NumE _ | TextE _) as e -> e - | UnE (unop, nto, exp) -> UnE (unop, nto, t_exp env exp) - | BinE (binop, nto, exp1, exp2) -> BinE (binop, nto, t_exp env exp1, t_exp env exp2) - | CmpE (cmpop, nto, exp1, exp2) -> CmpE (cmpop, nto, t_exp env exp1, t_exp env exp2) - | IdxE (exp1, exp2) -> IdxE (t_exp env exp1, t_exp env exp2) - | SliceE (exp1, exp2, exp3) -> SliceE (t_exp env exp1, t_exp env exp2, t_exp env exp3) - | UpdE (exp1, path, exp2) -> UpdE (t_exp env exp1, t_path env path, t_exp env exp2) - | ExtE (exp1, path, exp2) -> ExtE (t_exp env exp1, t_path env path, t_exp env exp2) - | StrE (fields, ch) -> StrE (List.map (fun (a, e) -> a, t_exp env e) fields, ch) - | DotE (e, a) -> DotE (t_exp env e, a) - | CompE (exp1, exp2) -> CompE (t_exp env exp1, t_exp env exp2) - | LiftE exp -> LiftE (t_exp env exp) - | LenE exp -> LenE (t_exp env exp) - | TupE es -> TupE (List.map (t_exp env) es) - | CallE (a, args) -> CallE (a, t_args env args) - | IterE (e, iterexp) -> IterE (t_exp env e, t_iterexp env iterexp) - | ProjE (e, i) -> ProjE (t_exp env e, i) - | UncaseE (e, mixop) -> UncaseE (t_exp env e, mixop) - | OptE None -> OptE None - | OptE (Some exp) -> OptE (Some exp) - | TheE exp -> TheE exp - | ListE es -> ListE (List.map (t_exp env) es) - | CatE (exp1, exp2) -> CatE (t_exp env exp1, t_exp env exp2) - | MemE (exp1, exp2) -> MemE (t_exp env exp1, t_exp env exp2) - | CaseE (mixop, e, ch) -> CaseE (mixop, t_exp env e, ch) - | CvtE (exp, t1, t2) -> CvtE (t_exp env exp, t1, t2) - | SubE (e, t1, t2) -> SubE (e, t1, t2) - -and t_iter env = function - | ListN (e, id_opt) -> ListN (t_exp env e, id_opt) - | i -> i - -and t_iterexp env (iter, vs) = - (t_iter env iter, List.map (fun (id, e) -> (id, t_exp env e)) vs) - -and t_path' env = function - | RootP -> RootP - | IdxP (path, e) -> IdxP (t_path env path, t_exp env e) - | SliceP (path, e1, e2) -> SliceP (t_path env path, t_exp env e1, t_exp env e2) - | DotP (path, a) -> DotP (t_path env path, a) - -and t_path env x = { x with it = t_path' env x.it; note = t_typ env x.note } - -and t_sym' env = function - | VarG (id, args) -> VarG (id, t_args env args) - | (NumG _ | TextG _ | EpsG) as g -> g - | SeqG syms -> SeqG (List.map (t_sym env) syms) - | AltG syms -> AltG (List.map (t_sym env) syms) - | RangeG (sym1, sym2) -> RangeG (t_sym env sym1, t_sym env sym2) - | IterG (sym, iter) -> IterG (t_sym env sym, t_iterexp env iter) - | AttrG (e, sym) -> AttrG (t_exp env e, t_sym env sym) - -and t_sym env x = { x with it = t_sym' env x.it } - -and t_arg' env = function - | ExpA exp -> ExpA (t_exp env exp) - | TypA t -> TypA t - | DefA id -> DefA id - | GramA sym -> GramA (t_sym env sym) - -and t_arg env x = { x with it = t_arg' env x.it } - -and t_param' env = function - | ExpP (id, t) -> ExpP (id, t_typ env t) - | TypP id -> TypP id - | DefP (id, ps, t) -> DefP (id, t_params env ps, t_typ env t) - | GramP (id, ps, t) -> GramP (id, t_params env ps, t_typ env t) - -and t_param env x = { x with it = t_param' env x.it } - -and t_args env = List.map (t_arg env) -and t_params env = List.map (t_param env) - -and t_prem' env = function - | RulePr (id, args, mixop, exp) -> RulePr (id, t_args env args, mixop, t_exp env exp) - | IfPr e -> IfPr (t_exp env e) - | LetPr (qs, e1, e2) -> LetPr (t_params env qs, t_exp env e1, t_exp env e2) - | ElsePr -> ElsePr - | IterPr (prem, iterexp) -> IterPr (t_prem env prem, t_iterexp env iterexp) - -and t_prem env x = { x with it = t_prem' env x.it } - -and t_prems env = List.map (t_prem env) - -let t_clause' env = function - | DefD (params, lhs, rhs, prems) -> - DefD (t_params env params, (*DO NOT intro calls on LHS: t_args env*) lhs, t_exp env rhs, t_prems env prems) - -let t_clause env (clause : clause) = { clause with it = t_clause' env clause.it } - -let t_clauses env = List.map (t_clause env) - -let t_inst' env = function - | InstD (params, args, deftyp) -> - InstD (t_params env params, (*DO NOT intro calls on LHS: t_args env*) args, t_deftyp env deftyp) - -let t_inst env (inst : inst) = { inst with it = t_inst' env inst.it } - -let t_insts env = List.map (t_inst env) - -let t_prod' env = function - | ProdD (params, lhs, rhs, prems) -> - ProdD (t_params env params, t_sym env lhs, t_exp env rhs, t_prems env prems) - -let t_prod env (prod : prod) = { prod with it = t_prod' env prod.it } - -let t_prods env = List.map (t_prod env) - -let t_rule' env = function - | RuleD (id, params, mixop, exp, prems) -> - RuleD (id, t_params env params, mixop, t_exp env exp, t_prems env prems) - -let t_rule env x = { x with it = t_rule' env x.it } - -let rec t_def' env = function - | RecD defs -> RecD (List.map (t_def env) defs) - | DecD (id, params, typ, clauses) -> - DecD (id, t_params env params, typ, t_clauses env clauses) - | TypD (id, params, insts) -> - TypD (id, t_params env params, t_insts env insts) - | RelD (id, params, mixop, typ, rules) -> - RelD (id, t_params env params, mixop, t_typ env typ, List.map (t_rule env) rules) - | GramD (id, params, typ, prods) -> - GramD (id, t_params env params, typ, t_prods env prods) - | HintD _ as def -> def - -and t_def env (def : def) = { def with it = t_def' env def.it } + | _ -> exp (* Step 2 and 3: Traverse definitions, collect type information, insert as soon as possible *) @@ -289,7 +124,6 @@ let ready_pairs (env : env) = env.pairs <- todo; S.elements ready - (* Rename parameters to avoid name clashes *) let rec rename_params s = function | [] -> [] @@ -311,6 +145,9 @@ let rec rename_params s = function (GramP (id', ps, t) $ at) :: rename_params (Il.Subst.add_gramid s id (VarG (id', []) $ id.at)) params +let lookup_arg_typ typcases m = + List.find_map (fun (m', (arg_typ, _, _), _) -> if Il.Eq.eq_mixop m m' then Some arg_typ else None) typcases + let insert_injections env (def : def) : def list = add_type_info env def; let pairs = ready_pairs env in @@ -318,30 +155,35 @@ let insert_injections env (def : def) : def list = List.map (fun (sub, sup) -> let name = injection_name sub sup in let (params_sub, real_id_sub, args_sub, cases_sub) = lookup env sub in - let (params_sup, _, _, _) = lookup env sup in + let (params_sup, _, _, cases_sub2) = lookup env sup in let params_sup' = rename_params Il.Subst.empty params_sup in let sub_ty = VarT (sub, List.map arg_of_param params_sub) $ no_region in let sup_ty = VarT (sup, List.map arg_of_param params_sup') $ no_region in let real_ty = VarT (real_id_sub, args_sub) $ no_region in - let clauses = List.map (fun (a, (arg_typ, _quants, _prems), _hints) -> - match arg_typ.it with - | TupT ts -> - let params = List.mapi (fun i (_, arg_typ_i) -> ExpP ("x" ^ string_of_int i $ no_region, arg_typ_i) $ no_region) ts in - let xes = List.map (fun param -> - match param.it with - | ExpP (x, arg_typ_i) -> VarE x $$ no_region % arg_typ_i - | TypP _ | DefP _ | GramP _ -> assert false) params + let clauses = List.map (fun (m, (arg_typ, _quants, _prems), _hints) -> + let arg_typ2 = lookup_arg_typ cases_sub2 m in + match arg_typ.it, arg_typ2 with + | TupT ts, Some ({it = TupT ts'; _} as arg_typ2') -> + let quants = List.mapi (fun i (_, arg_typ_i) -> ExpP ("x" ^ string_of_int i $ no_region, arg_typ_i) $ no_region) ts in + let xes is_lhs = List.map2 (fun quant (_, arg_typ_i2) -> + match quant.it with + | ExpP (x, arg_typ_i) -> + let base_exp = VarE x $$ no_region % arg_typ_i in + if is_lhs || Il.Eq.eq_typ arg_typ_i arg_typ_i2 + then base_exp + else SubE (base_exp, arg_typ_i, arg_typ_i2) $$ no_region % arg_typ_i2 + | TypP _ | DefP _ | GramP _ -> assert false) quants ts' in - let xe = TupE xes $$ no_region % arg_typ in - DefD (params, - [ExpA (CaseE (a, xe, Unchecked) $$ no_region % real_ty) $ no_region], - CaseE (a, xe, Unchecked) $$ no_region % sup_ty, []) $ no_region + let xe is_lhs = TupE (xes is_lhs) $$ no_region % (if is_lhs then arg_typ else arg_typ2') in + DefD (quants, + [ExpA (CaseE (m, xe true, Unchecked) $$ no_region % real_ty) $ no_region], + t_exp env (CaseE (m, xe false, Unchecked) $$ no_region % sup_ty), []) $ no_region | _ -> let x = "x" $ no_region in let xe = VarE x $$ no_region % arg_typ in DefD ([ExpP (x, arg_typ) $ x.at], - [ExpA (CaseE (a, xe, Unchecked) $$ no_region % real_ty) $ no_region], - CaseE (a, xe, Unchecked) $$ no_region % sup_ty, []) $ no_region + [ExpA (CaseE (m, xe, Unchecked) $$ no_region % real_ty) $ no_region], + CaseE (m, xe, Unchecked) $$ no_region % sup_ty, []) $ no_region ) cases_sub in DecD (name, params_sub @ params_sup' @ [ExpP ("_" $ no_region, sub_ty) $ no_region], sup_ty, clauses) $ no_region ) pairs @@ -349,8 +191,9 @@ let insert_injections env (def : def) : def list = let transform (defs : script) = let env = new_env () in - let defs' = List.map (t_def env) defs in - let defs'' = List.concat_map (insert_injections env) defs' in + let transformer = { base_transformer with transform_exp = t_exp env } in + let defs' = List.map (transform_def transformer) defs in + env.pairs_mutable <- false; + let defs'' = List.concat_map (insert_injections env) defs' in S.iter (fun (sub, sup) -> error sup.at ("left-over subtype coercion `" ^ sub.it ^ "` <: `" ^ sup.it ^ "`")) env.pairs; - defs'' - + defs'' diff --git a/spectec/src/middlend/sub.mli b/spectec/src/middlend/sub.mli index 542bbf8052..313c478222 100644 --- a/spectec/src/middlend/sub.mli +++ b/spectec/src/middlend/sub.mli @@ -1 +1,24 @@ +(* +This transformation replaces SubE expressions with explicit subtype injection +functions. + +1. It traverses all expressions and finds out which type pairs + occur in SubE expressions + - all type pairs mentioned in SubE expressions + - for all variant types: list of constructors + - for all alias types: right hand side of the alias + +2. It traverses all definitions to collect information about variant types and + type aliases (assuming only such types occur in type aliases). + +3. It generates explicit injection functions for pairs, and put them in the +right spot (after both types are defined, but outside `RecD` groups) + +4. It replaces occurrences of SubE with a suitable CallE + +Step 1 and 4 are done together, and step 2 and 3 + +This pass assumes that there is no name shadowing in the type definitions. +*) + val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/subexpansion.ml b/spectec/src/middlend/subexpansion.ml new file mode 100644 index 0000000000..772b42b1cc --- /dev/null +++ b/spectec/src/middlend/subexpansion.ml @@ -0,0 +1,185 @@ + + +open Util +open Source +open Il.Ast +open Il +open Il.Walk + +(* Errors *) + +let error at msg = Error.error at "sub expression expansion" msg + +(* Environment *) + +(* Global IL env *) +let env_ref = ref Il.Env.empty + +let reduce_arg env arg = + let Ok arg' | Error arg' = Eval.reduce_arg env arg in arg' + +let empty_tuple_exp at = TupE [] $$ at % (TupT [] $ at) + +(* Computes the cartesian product of a given list. *) +let product_of_lists (lists : 'a list list) = + List.fold_left (fun acc lst -> + List.concat_map (fun existing -> + List.map (fun v -> v :: existing) lst) acc) [[]] lists + +let product_of_lists_append (lists : 'a list list) = + List.fold_left (fun acc lst -> + List.concat_map (fun existing -> + List.map (fun v -> existing @ [v]) lst) acc) [[]] lists + +let get_quant_id q = + match q.it with + | ExpP (id, _) | TypP id + | DefP (id, _, _) | GramP (id, _, _) -> id.it + +let eq_sube (id, t1, t2) (id', t1', t2') = + Eq.eq_id id id' && Eq.eq_typ t1 t1' && Eq.eq_typ t2 t2' + +let collect_sube_exp e = + match e.it with + (* Assumption - nested sub expressions do not exist. Must also be a varE. *) + | SubE ({it = VarE id; _}, t1, t2) -> ([id, t1, t2], false) + | _ -> ([], true) + +let check_matching c_args match_args = + match Eval.match_list Eval.match_arg !env_ref Subst.empty c_args match_args with + | Ok (Some _) -> true + | Ok None | Error _ -> false + +let get_case_typ t = + match t.it with + | TupT typs -> typs + | _ -> ["_" $ t.at, t] + +let collect_all_instances case_typ ids at inst = + match inst.it with + | InstD (_, _, {it = VariantT typcases; _}) when + List.for_all (fun (_, (t, _, _), _) -> t.it = TupT []) typcases -> + List.map (fun (m, _, _) -> ([], CaseE (m, empty_tuple_exp no_region, Unchecked) $$ at % case_typ)) typcases + | InstD (_, _, {it = VariantT typcases; _}) -> + let _, new_cases = + List.fold_left (fun (ids', acc) (m, (t, _, _), _) -> + let typs = get_case_typ t in + let new_quants, typs' = Utils.improve_ids_quants ids' true t.at typs in + let exps = List.map (fun (id, t) -> VarE id $$ id.at % t) typs' in + let tup_exp = match t.it, exps with + | TupT _, _ -> TupE exps $$ at % t + (* Non-tuple case type, the argument is not wrapped *) + | _, [e] -> e + | _ -> error at "Non-tuple case type should have exactly one argument" + in + let case_exp = CaseE (m, tup_exp, Unchecked) $$ at % case_typ in + let new_ids = List.map get_quant_id new_quants in + (new_ids @ ids', (new_quants, case_exp) :: acc) + ) (ids, []) typcases + in + new_cases + | _ -> error at "Expected a variant type" + +let rec collect_all_instances_typ ids at typ = + match typ.it with + | VarT (var_id, dep_args) -> let (_, insts) = Il.Env.find_typ !env_ref var_id in + (match insts with + | [] -> [] (* Should never happen *) + | _ -> + let inst_opt = List.find_opt (fun inst -> + match inst.it with + | InstD (_, args, _) -> check_matching dep_args args + ) insts in + match inst_opt with + | None -> error at ("Could not find specific instance for typ: " ^ Il.Print.string_of_typ typ) + | Some inst -> collect_all_instances typ ids at inst + ) + | TupT exp_typ_pairs -> + let instances_list = List.map (fun (_, t) -> + collect_all_instances_typ ids at t + ) exp_typ_pairs in + let product = product_of_lists_append instances_list in + List.map (fun lst -> + let quants, exps = List.split lst in + List.concat quants, TupE exps $$ at % typ) product + | _ -> [] + +let generate_subst_list lhs quants = + let base_sube_collector : (id * typ * typ) list collector = base_collector [] (@) in + let collector = { base_sube_collector with collect_exp = collect_sube_exp } in + (* Collect all unique sub expressions for each argument *) + let subs = List.concat_map (fun a -> + Lib.List.nub eq_sube (collect_arg collector a) + ) lhs in + let ids = List.map get_quant_id quants in + + (* Collect all cases for the specific subtype, generating any potential quantifiers in the process *) + let _, cases = + List.fold_left (fun (quants, cases) (id, t1, _) -> + let ids' = List.map get_quant_id quants @ ids in + let instances = collect_all_instances_typ ids' id.at t1 in + let new_quants = List.concat_map fst instances in + let cases'' = List.map (fun case_data -> (id, case_data)) instances in + (new_quants @ quants, cases'' :: cases) + ) (quants, []) subs + in + + (* Compute cartesian product for all cases and generate a subst *) + let cases' = product_of_lists cases in + List.map (List.fold_left (fun (quants, subst) (id, (quants', exp)) -> + (quants' @ quants, Il.Subst.add_varid subst id exp)) ([], Il.Subst.empty) + ) cases' + +let t_clause clause = + match clause.it with + | DefD (quants, lhs, rhs, prems) -> + let subst_list = generate_subst_list lhs quants in + List.map (fun (quants', subst) -> + (* Subst all occurrences of the subE id *) + let new_lhs = Il.Subst.subst_args subst lhs in + let new_prems = Il.Subst.subst_list Il.Subst.subst_prem subst prems in + let new_rhs = Il.Subst.subst_exp subst rhs in + + (* Filtering quants - only the subst ids *) + let quants_filtered = Lib.List.filter_not (fun b -> match b.it with + | ExpP (id, _) -> Il.Subst.mem_varid subst id + | _ -> false + ) (quants' @ quants) in + let new_quants, _ = Il.Subst.subst_params subst quants_filtered in + (* Reduction is done here to remove subtyping expressions *) + DefD (new_quants, List.map (reduce_arg !env_ref) new_lhs, new_rhs, new_prems) $ clause.at + ) subst_list + +let t_inst inst = + match inst.it with + | InstD (quants, lhs, deftyp) -> + let subst_list = generate_subst_list lhs quants in + List.map (fun (quants', subst) -> + (* Subst all occurrences of the subE id *) + let new_lhs = Il.Subst.subst_args subst lhs in + let new_rhs = Il.Subst.subst_deftyp subst deftyp in + + (* Filtering quants - only the subst ids *) + let quants_filtered = Lib.List.filter_not (fun b -> match b.it with + | ExpP (id, _) -> Il.Subst.mem_varid subst id + | _ -> false + ) (quants' @ quants) in + + let new_quants, _ = Il.Subst.subst_params subst quants_filtered in + (* Reduction is done here to remove subtyping expressions *) + InstD (new_quants, List.map (reduce_arg !env_ref) new_lhs, new_rhs) $ inst.at + ) subst_list + + +let rec t_def def = + match def.it with + | RecD defs -> { def with it = RecD (List.map t_def defs) } + | DecD (id, params, typ, clauses) -> + { def with it = DecD (id, params, typ, List.concat_map t_clause clauses) } + | TypD (id, params, insts) -> + { def with it = TypD (id, params, List.concat_map t_inst insts)} + | _ -> def + +let transform (defs : script) = + env_ref := Il.Env.env_of_script defs; + List.map (t_def) defs \ No newline at end of file diff --git a/spectec/src/middlend/subexpansion.mli b/spectec/src/middlend/subexpansion.mli new file mode 100644 index 0000000000..b792efed2f --- /dev/null +++ b/spectec/src/middlend/subexpansion.mli @@ -0,0 +1,36 @@ +(* +This pass expands the subtyping patterns that appear in the LHS of +function clauses and type family arguments. + +It achieves this through the following steps: + * For each argument, we collect every unique sub expression. + * Then, for each sub expression, we collect every case that is + possible in the subtype. If the specific case additionally carries + values, then we generate quants to add in the function scope. + * With all of these cases, for each unique sub expression, we compute + the cartesian product in order to absolutely grab all the possible cases. + See $cvtop to see how this might be done. + * Once we have calculated the product, we generate a subst for each product + and proceed to generate the clause/type instance. + * Finally, we filter out quants that appear in the subst. + +For example, take the following types and function: + +syntax A = t1 nat | t2 nat nat +syntax B = t1 nat | t2 nat nat | t3 | t4 + +def $foo(B) : nat +def $foo(x : A <: B) = 1 +def $foo(t3) = 2 +def $foo(t4) = 3 + +Would be transformed as such: + +def $foo(B) : nat +def $foo{n : nat}(t1(n)) = 1 +def $foo{n1 : nat, n2 : nat}(t2(n1, n2)) = 1 +def $foo(t3) = 2 +def $foo(t4) = 3 +*) + +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/totalize.ml b/spectec/src/middlend/totalize.ml index 6a4e543580..f99af76922 100644 --- a/spectec/src/middlend/totalize.ml +++ b/spectec/src/middlend/totalize.ml @@ -1,26 +1,12 @@ -(* -This transformation totalizes partial functions. - -Partial functions are recognized by the partial flag hint (for now, inference -would be possible). - -The declarations are changed: - - * the return type is wrapped in the option type `?` - * all clauses rhs' are wrapped in the option type injection `?(…)` - * a catch-all clause is added returning `null` - -All calls to such functions are wrapped in option projection `THE e`. - -*) - open Util open Source open Il.Ast +open Il.Walk +open Il (* Errors *) -let _error at msg = Error.error at "totality" msg +let error at msg = Error.error at "totality" msg (* Environment *) @@ -42,188 +28,100 @@ let register_partial (env : env) (id :id) = (* Transformation *) (* The main transformation case *) -let rec t_exp env exp = - let exp' = t_exp2 env exp in - match exp'.it with +let t_exp env exp = + match exp.it with | CallE (f, _) when is_partial env f -> - {exp' with it = TheE {exp' with note = IterT (exp'.note, Opt) $ exp'.at}} - | _ -> exp' - - -(* Type traversal *) - -and t_typ env x = { x with it = t_typ' env x.it } - -and t_typ' env = function - | VarT (id, args) -> VarT (id, t_args env args) - | (BoolT | NumT _ | TextT) as t -> t - | TupT xts -> TupT (List.map (fun (id, t) -> (id, t_typ env t)) xts) - | IterT (t, iter) -> IterT (t_typ env t, t_iter env iter) - -and t_deftyp env x = { x with it = t_deftyp' env x.it } - -and t_deftyp' env = function - | AliasT t -> AliasT (t_typ env t) - | StructT typfields -> StructT (List.map (t_typfield env) typfields) - | VariantT typcases -> VariantT (List.map (t_typcase env) typcases) - -and t_typfield env (atom, (t, quants, prems), hints) = - (atom, (t_typ env t, t_params env quants, t_prems env prems), hints) -and t_typcase env (atom, (t, quants, prems), hints) = - (atom, (t_typ env t, t_params env quants, t_prems env prems), hints) - - -(* Expr traversal *) - -and t_exp2 env x = { x with it = t_exp' env x.it; note = t_typ env x.note } - -and t_exp' env = function - | (VarE _ | BoolE _ | NumE _ | TextE _) as e -> e - | UnE (unop, nto, exp) -> UnE (unop, nto, t_exp env exp) - | BinE (binop, nto, exp1, exp2) -> BinE (binop, nto, t_exp env exp1, t_exp env exp2) - | CmpE (cmpop, nto, exp1, exp2) -> CmpE (cmpop, nto, t_exp env exp1, t_exp env exp2) - | IdxE (exp1, exp2) -> IdxE (t_exp env exp1, t_exp env exp2) - | SliceE (exp1, exp2, exp3) -> SliceE (t_exp env exp1, t_exp env exp2, t_exp env exp3) - | UpdE (exp1, path, exp2) -> UpdE (t_exp env exp1, t_path env path, t_exp env exp2) - | ExtE (exp1, path, exp2) -> ExtE (t_exp env exp1, t_path env path, t_exp env exp2) - | StrE (fields, ch) -> StrE (List.map (fun (a, e) -> a, t_exp env e) fields, ch) - | DotE (e, a) -> DotE (t_exp env e, a) - | CompE (exp1, exp2) -> CompE (t_exp env exp1, t_exp env exp2) - | LenE exp -> LenE (t_exp env exp) - | TupE es -> TupE (List.map (t_exp env) es) - | CallE (a, args) -> CallE (a, List.map (t_arg env) args) - | IterE (e, iterexp) -> IterE (t_exp env e, t_iterexp env iterexp) - | ProjE (e, i) -> ProjE (t_exp env e, i) - | UncaseE (e, mixop) -> UncaseE (t_exp env e, mixop) - | OptE None -> OptE None - | OptE (Some exp) -> OptE (Some (t_exp env exp)) - | TheE exp -> TheE (t_exp env exp) - | ListE es -> ListE (List.map (t_exp env) es) - | LiftE exp -> LiftE (t_exp env exp) - | CatE (exp1, exp2) -> CatE (t_exp env exp1, t_exp env exp2) - | MemE (exp1, exp2) -> MemE (t_exp env exp1, t_exp env exp2) - | CaseE (mixop, e, ch) -> CaseE (mixop, t_exp env e, ch) - | CvtE (exp, t1, t2) -> CvtE (t_exp env exp, t1, t2) - | SubE (exp, t1, t2) -> SubE (t_exp env exp, t_typ env t1, t_typ env t2) - -and t_iter env = function - | ListN (e, id_opt) -> ListN (t_exp env e, id_opt) - | i -> i - -and t_iterexp env (iter, xes) = - (t_iter env iter, List.map (fun (x, e) -> x, t_exp env e) xes) - -and t_path' env = function - | RootP -> RootP - | IdxP (path, e) -> IdxP (t_path env path, t_exp env e) - | SliceP (path, e1, e2) -> SliceP (t_path env path, t_exp env e1, t_exp env e2) - | DotP (path, a) -> DotP (t_path env path, a) - -and t_path env x = { x with it = t_path' env x.it; note = t_typ env x.note } - -and t_sym' env = function - | VarG (id, args) -> VarG (id, t_args env args) - | (NumG _ | TextG _ | EpsG) as g -> g - | SeqG syms -> SeqG (List.map (t_sym env) syms) - | AltG syms -> AltG (List.map (t_sym env) syms) - | RangeG (sym1, sym2) -> RangeG (t_sym env sym1, t_sym env sym2) - | IterG (sym, iter) -> IterG (t_sym env sym, t_iterexp env iter) - | AttrG (e, sym) -> AttrG (t_exp env e, t_sym env sym) - -and t_sym env x = { x with it = t_sym' env x.it } - -and t_arg' env = function - | ExpA exp -> ExpA (t_exp env exp) - | TypA t -> TypA (t_typ env t) - | DefA id -> DefA id - | GramA sym -> GramA (t_sym env sym) - -and t_arg env x = { x with it = t_arg' env x.it } - -and t_param' env = function - | ExpP (id, t) -> ExpP (id, t_typ env t) - | TypP id -> TypP id - | DefP (id, ps, t) -> DefP (id, t_params env ps, t_typ env t) - | GramP (id, ps, t) -> GramP (id, t_params env ps, t_typ env t) - -and t_param env x = { x with it = t_param' env x.it } + {exp with it = TheE {exp with note = IterT (exp.note, Opt) $ exp.at}} + | _ -> exp -and t_args env = List.map (t_arg env) -and t_params env = List.map (t_param env) - -and t_prem' env = function - | RulePr (id, args, mixop, exp) -> RulePr (id, t_args env args, mixop, t_exp env exp) - | IfPr e -> IfPr (t_exp env e) - | LetPr (qs, e1, e2) -> LetPr (t_params env qs, t_exp env e1, t_exp env e2) - | ElsePr -> ElsePr - | IterPr (prem, iterexp) -> IterPr (t_prem env prem, t_iterexp env iterexp) - -and t_prem env x = { x with it = t_prem' env x.it } - -and t_prems env = List.map (t_prem env) - -let t_clause' env = function - | DefD (params, lhs, rhs, prems) -> - DefD (t_params env params, t_args env lhs, t_exp env rhs, t_prems env prems) - -let t_clause env (clause : clause) = { clause with it = t_clause' env clause.it } - -let t_inst' env = function - | InstD (params, args, deftyp) -> - InstD (t_params env params, t_args env args, t_deftyp env deftyp) - -let t_inst env (inst : inst) = { inst with it = t_inst' env inst.it } - -let t_insts env = List.map (t_inst env) - -let t_prod' env = function - | ProdD (params, lhs, rhs, prems) -> - ProdD (t_params env params, t_sym env lhs, t_exp env rhs, t_prems env prems) - -let t_prod env (prod : prod) = { prod with it = t_prod' env prod.it } - -let t_rule' env = function - | RuleD (id, params, mixop, exp, prems) -> - RuleD (id, t_params env params, mixop, t_exp env exp, t_prems env prems) - -let t_rule env x = { x with it = t_rule' env x.it } - -let rec t_def' env = function - | RecD defs -> RecD (List.map (t_def env) defs) +let has_partial_call env exp = + match exp.it with + | TheE ({ it = CallE (f, _); _}) when is_partial env f -> (true, false) + | _ -> (false, true) + + +(* An expression exp is well formed if: + - For all sub expressions exp' of exp, + - exp' is not a partial function call or + - exp' is a partial function call and there does not exist a + sub expression exp'' of exp' that is a partial function call. +*) +let wf_exp env exp = + let exists_checker = { exists_base_checker with collect_exp = has_partial_call env } in + match exp.it with + | TheE ({ it = CallE (f, _); _} as exp') when is_partial env f && collect_exp exists_checker exp' -> + (false, false) + | _ -> (true, true) + +let fix_exp env eps exp = + match exp.it with + | TheE ({ it = CallE (f, _); _} as exp') when is_partial env f -> + let id = (Fresh.fresh_varid "iter_val") $ exp'.at in + eps := (id, exp') :: !eps; + { exp with it = VarE id } + | _ -> exp + +let fix_partial_funcs env exp = + let forall_checker = { forall_base_checker with collect_exp = wf_exp env } in + let is_wf = collect_exp forall_checker exp in + match exp.it with + (* If there is a call in the root of the RHS then just return that *) + | TheE ({ it = CallE (f, _); _} as exp') when is_partial env f && is_wf -> + exp' + | _ when is_wf -> + (* Apply transformation to wrap an option iteration on the rhs *) + let eps_ref = ref [] in + let t = { base_transformer with transform_exp = fix_exp env eps_ref } in + let t_e = transform_exp t exp in + let free_vars = Free.free_exp t_e in + let eps' = List.filter (fun (id, _) -> Free.Set.mem id.it free_vars.varid) !eps_ref in + if eps' = [] then + { exp with it = OptE (Some exp); note = IterT (exp.note, Opt) $ exp.at } + else + { exp with it = IterE (t_e, (Opt, eps')); note = IterT (exp.note, Opt) $ exp.at } + | _ -> error exp.at "Partial function call chains are not supported." + +let has_catch_all clauses = + List.exists (fun clause -> + let DefD (_, args, _, prems) = clause.it in + List.for_all (fun a -> + match a.it with + | ExpA {it = VarE _; _} -> true + | TypA _ | DefA _ -> true + | _ -> false + ) args && List.for_all (fun p -> p.it = ElsePr) prems + ) clauses + +let rec t_def env d = + let t = { base_transformer with transform_exp = t_exp env } in + match d.it with + | RecD defs -> RecD (List.map (t_def env) defs) $ d.at | DecD (id, params, typ, clauses) -> - let params' = t_params env params in - let typ' = t_typ env typ in - let clauses' = List.map (t_clause env) clauses in + let params' = List.map (transform_param t) params in + let typ' = transform_typ t typ in + let clauses' = List.map (transform_clause t) clauses in if is_partial env id then let typ'' = IterT (typ', Opt) $ no_region in let clauses'' = List.map (fun clause -> match clause.it with - DefD (params, lhs, rhs, prems) -> + DefD (quants, lhs, rhs, prems) -> { clause with - it = DefD (t_params env params, lhs, OptE (Some rhs) $$ no_region % typ'', prems) } + it = DefD (List.map (transform_param t) quants, lhs, fix_partial_funcs env rhs, prems) } ) clauses' in let params, args = List.mapi (fun i param -> match param.it with | ExpP (_, typI) -> let x = ("x" ^ string_of_int i) $ no_region in [ExpP (x, typI) $ x.at], ExpA (VarE x $$ no_region % typI) $ no_region - | TypP id -> [], TypA (VarT (id, []) $ no_region) $ no_region + | TypP id -> [TypP id $ no_region], TypA (VarT (id, []) $ no_region) $ no_region | DefP (id, _, _) -> [], DefA id $ no_region | GramP (id, _, _) -> [], GramA (VarG (id, []) $ no_region) $ no_region ) params' |> List.split in let catch_all = DefD (List.concat params, args, - OptE None $$ no_region % typ'', []) $ no_region in - DecD (id, params', typ'', clauses'' @ [ catch_all ]) + OptE None $$ no_region % typ'', [ElsePr $ no_region]) $ no_region in + let last_c = if has_catch_all clauses'' then [] else [catch_all] in + DecD (id, params', typ'', clauses'' @ last_c) $ d.at else - DecD (id, params', typ', clauses') - | TypD (id, params, insts) -> - TypD (id, t_params env params, t_insts env insts) - | RelD (id, params, mixop, typ, rules) -> - RelD (id, t_params env params, mixop, t_typ env typ, List.map (t_rule env) rules) - | GramD (id, params, typ, prods) -> - GramD (id, t_params env params, typ, List.map (t_prod env) prods) - | HintD _ as def -> def - -and t_def env x = { x with it = t_def' env x.it } - + DecD (id, params', typ', clauses') $ d.at + | _ -> transform_def t d let is_partial_hint hint = hint.hintid.it = "partial" @@ -237,4 +135,3 @@ let transform (defs : script) = let env = new_env () in List.iter (register_hints env) defs; List.map (t_def env) defs - diff --git a/spectec/src/middlend/totalize.mli b/spectec/src/middlend/totalize.mli index 542bbf8052..e12c224a8e 100644 --- a/spectec/src/middlend/totalize.mli +++ b/spectec/src/middlend/totalize.mli @@ -1 +1,24 @@ +(* +This transformation totalizes partial functions. + +Partial functions are recognized by the partial flag hint (for now, inference +would be possible). + +The declarations are changed: + + * the return type is wrapped in the option type `?` + * all clauses rhs' are wrapped in the option type injection `?(…)` + unless rhs' contains a partial function call itself. + * For this case, if it is only the partial function itself, + it just leaves it untouched, as the function already returns + the option type. + * If its a more elaborate expression, it wraps the partial function + in an option iteration. + * a catch-all clause is added returning `null` only when there is + no catch-all clause present. + +All calls to such functions are wrapped in option projection `THE e`. + +*) + val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/typefamilyremoval.ml b/spectec/src/middlend/typefamilyremoval.ml new file mode 100644 index 0000000000..6457978cf2 --- /dev/null +++ b/spectec/src/middlend/typefamilyremoval.ml @@ -0,0 +1,658 @@ +open Il.Ast +open Util.Source +open Util +open Il +open Xl + +module StringMap = Map.Make(String) + +(* (family id, instance quants, subst, case number, family type, substituted sub type, original sub type) *) +type family_data = (id * quant list * Subst.t * int * typ * typ * typ) + +let error at msg = Error.error at "Type families removal" msg + +let projection_hint_id = "tf_projection_func" +let projection_hint = { hintid = projection_hint_id $ no_region; hintexp = El.Ast.SeqE [] $ no_region} + +let quant_to_string quant = + match quant.it with + | ExpP (id, _) -> id.it + | TypP id -> id.it + | DefP (id, _, _) -> id.it + | GramP (id, _, _) -> id.it + +let make_prefix = "mk_" +let proj_prefix = "proj_" +let var_typ_fam = "var_x" +let iter_var_name = "iter_" +let name_prefix id = id.it ^ "_" + +let empty_info typ_id: region * Xl.Atom.info = (no_region, {def = typ_id; case = ""}) +let sub_type_name_quants quants = (String.concat "_" (List.map quant_to_string quants)) +let constructor_name' id case_num = make_prefix ^ name_prefix id ^ Int.to_string case_num +let constructor_name_mixop id num_quants case_num: mixop = + Xl.Mixop.(Seq (Atom (Xl.Atom.Atom (constructor_name' id case_num) $$ empty_info id.it) + :: List.init num_quants (fun _ -> Arg ()))) +let proj_name' id case_num = proj_prefix ^ name_prefix id ^ Int.to_string case_num +let proj_name id case_num = proj_name' id case_num $ id.at + +let construct_tuple_typ typ quants at = + let name = var_typ_fam $ typ.at in + let extra_case_args = List.map (fun p -> match p.it with + | ExpP (x, t) -> (x, t) + | _ -> error at "Removal of other arguments is not supported yet" + ) quants in + TupT (extra_case_args @ [(name, typ)]) $ typ.at + +let construct_tuple_exp at e t tup_t quants args = + let tupt = construct_tuple_typ tup_t quants at in + let extra_tup_exps = List.map (fun a -> match a.it with + | ExpA exp -> exp + | _ -> error at "Removal of other arguments is not supported yet" + ) args in + TupE (extra_tup_exps @ [{e with note = t}]) $$ e.at % tupt + +(* HACK This is used to distinguish between normal types and type families *) +let check_normal_type_creation (inst : inst) : bool = + match inst.it with + | InstD (_, args, _) -> List.for_all (fun arg -> + match arg.it with + (* Args in normal types can really only be variable expressions or type params *) + | ExpA {it = VarE _; _} | TypA _ -> true + | _ -> false + ) args + +let rec reduce_type_aliasing env t = + match t.it with + | VarT(id, args) -> + (match Env.find_opt_typ env id with + | Some (_, [inst]) when check_normal_type_creation inst -> reduce_inst_alias env args inst t + | _ -> t + ) + | _ -> t + +and reduce_inst_alias env args inst base_typ = + match inst.it with + | InstD (_, args', {it = AliasT typ; _}) -> + let subst_opt = Eval.match_list Eval.match_arg_static env Subst.empty args args' in + (match subst_opt with + | Ok (Some subst) -> reduce_type_aliasing env (Subst.subst_typ subst typ) + | Ok None | Error _ -> reduce_type_aliasing env typ + ) + | _ -> base_typ + +let make_arg_from_param p = + (match p.it with + | ExpP (id, typ) -> ExpA (VarE id $$ id.at % typ) + | TypP id -> TypA (VarT (id, []) $ id.at) + | DefP (id, _, _) -> DefA id + | GramP _ -> assert false + ) $ p.at + +let create_arg_param_subst args params = + List.fold_left2 (fun s a p -> + match a.it, p.it with + | ExpA e, ExpP (id, _) -> Subst.add_varid s id e + | TypA t, TypP id -> Subst.add_typid s id t + | DefA id, DefP (id', _, _) -> Subst.add_defid s id' id + | GramA sym, GramP (id, _, _) -> Subst.add_gramid s id sym + | _ -> s + ) Subst.empty args params + +let remove_iter_from_type t = + match t.it with + | IterT (t, _) -> t + | _ -> t + +let make_arg p = + (match p.it with + | ExpP (id, typ) -> ExpA (VarE id $$ id.at % typ) + | TypP id -> TypA (VarT (id, []) $ id.at) + | DefP (id, _, _) -> DefA id + | GramP (id, _, _) -> GramA (VarG (id, []) $ id.at) + ) $ p.at + +let check_type_family insts = + match insts with + | [] -> false + | [inst] when check_normal_type_creation inst -> false + | _ -> true + +let has_one_inst env family_typ = + match family_typ.it with + | VarT (id, _) -> (match (Env.find_opt_typ env id) with + | Some (_, [_]) -> true + | _ -> false + ) + | _ -> false + +let extend_quant_set set quants = + List.fold_left (fun acc q -> + match q.it with + | ExpP (id, typ) -> StringMap.add id.it ([], typ) acc + | DefP (id, params, typ) -> StringMap.add id.it (params, typ) acc + | _ -> acc + ) set quants + +let make_quant_set quants = extend_quant_set StringMap.empty quants + +let reduce_typ env typ = + let Ok typ' | Error typ' = Eval.reduce_typ env typ in typ' +let reduce_arg env arg = + let Ok arg' | Error arg' = Eval.reduce_arg env arg in arg' + +let rec check_type_equality env t t' = + let r_t = reduce_type_aliasing env t in + let r_t' = reduce_type_aliasing env t' in + match r_t.it, r_t'.it with + | VarT (id, args), VarT (id', args') -> + let r_args = List.map (reduce_arg env) args in + let r_args' = List.map (reduce_arg env) args' in + id.it = id'.it && Eq.eq_list Eq.eq_arg r_args r_args' + | IterT (typ, iter), IterT (typ', iter') -> + Eq.eq_iter iter iter' && check_type_equality env typ typ' + | TupT xts, TupT xts' -> (List.length xts = List.length xts') && + List.for_all2 (fun (x, typ) (x', typ') -> Eq.eq_id x x' && check_type_equality env typ typ') xts xts' + | _ -> Eq.eq_typ t t' + +let rec get_real_typ_from_exp quant_map env e = + match e.it with + | VarE id -> (match StringMap.find_opt id.it quant_map with + | Some (_, typ) -> typ + | None -> e.note + ) + | CallE (id, args) -> + (match (Env.find_opt_def env id) with + | Some (params, typ, _) -> + let subst = create_arg_param_subst args params in + let s_typ = Subst.subst_typ subst typ in + s_typ + | None -> + (match StringMap.find_opt id.it quant_map with + | Some (params, typ) -> + let subst = create_arg_param_subst args params in + Subst.subst_typ subst typ + | None -> e.note + ) + ) + | CaseE (m, _, _) -> + let r_typ = reduce_typ env e.note in + let id = (match r_typ.it with + | VarT (id, _) -> id + | _ -> + (* Will make the lookup fail*) + "" $ no_region + ) in + (match (Env.find_opt_typ env id) with + | Some (_, [{it = InstD(_, _, {it = VariantT typcases; _}); _}]) when + Option.is_some (List.find_opt (fun (m', _, _) -> Eq.eq_mixop m m') typcases) -> + r_typ + | _ -> e.note + ) + | NumE (`Nat _) -> NumT `NatT $ e.at + | NumE (`Int _) -> NumT `IntT $ e.at + | NumE (`Rat _) -> NumT `RatT $ e.at + | NumE (`Real _) -> NumT `RealT $ e.at + | UnE (_, `BoolT, _) -> BoolT $ e.at + | UnE (_, (#Num.typ as t), _) -> NumT t $ e.at + | BinE (_, `BoolT, _, _) -> BoolT $ e.at + | BinE (_, (#Num.typ as t), _, _) -> NumT t $ e.at + | BoolE _ -> BoolT $ e.at + | TextE _ -> TextT $ e.at + | TupE es -> let typs = List.map (get_real_typ_from_exp quant_map env) es in + let get_tuple_ids t = + match es, t.it with + | _, TupT typs -> List.map fst typs + | [_], _ -> ["_" $ t.at] (* Has one tuple exp, might just be a normal type instead of a single tuple type *) + | _, _ -> assert false (* Should never happen *) + in + let expected_ids = get_tuple_ids (reduce_typ env e.note) in + TupT (List.combine expected_ids typs) $ e.at + | ListE (e' :: _) -> + let iter = (match e.note.it with + | IterT (_, i) -> i + | _ -> List + ) in + let t = get_real_typ_from_exp quant_map env e' in + IterT (t, iter) $ e.at + | OptE (Some e) -> let t = get_real_typ_from_exp quant_map env e in + IterT (t, Opt) $ e.at + | IterE (e', (iter, _)) -> + let t = get_real_typ_from_exp quant_map env e' in + IterT (t, iter) $ e.at + | IdxE (e', _) -> + let t = get_real_typ_from_exp quant_map env e' in + remove_iter_from_type t + | LenE _ -> NumT `NatT $ e.at + | MemE _ -> BoolT $ e.at + | SubE (_, _, t) -> t + | LiftE e1 -> + let t = get_real_typ_from_exp quant_map env e1 in + IterT (remove_iter_from_type t, List) $ e.at + | SliceE (e1, _e2, _e3) -> get_real_typ_from_exp quant_map env e1 + | UpdE (e1, _, _) | ExtE (e1, _, _) -> get_real_typ_from_exp quant_map env e1 + | CvtE (_, _, nt1) -> NumT nt1 $ e.at + | TheE e1 -> + let t = get_real_typ_from_exp quant_map env e1 in + remove_iter_from_type t + | CatE (e1, _) -> get_real_typ_from_exp quant_map env e1 + | CompE (e1, _) -> get_real_typ_from_exp quant_map env e1 + | StrE _ -> reduce_typ env e.note + (* TODO ProjE and UncaseE *) + | _ -> e.note + +let is_family_typ env typ = + match typ.it with + | VarT (id, _) -> + (match (Env.find_opt_typ env id) with + | Some (_, insts) -> check_type_family insts + | _ -> false + ) + | _ -> false + +let rec get_chain_from_inst id env family_typ args insts = + let rec helper insts num = + match insts with + | [] -> [] + | {it = InstD (quants, args', {it = AliasT sub_typ; _}); _}::insts' -> + (match (Eval.match_list Eval.match_arg_static env Subst.empty args args') with + | Ok (Some subst) -> + let subst_typ = reduce_type_aliasing env (Il.Subst.subst_typ subst sub_typ) in + (id, quants, subst, num, family_typ, subst_typ, sub_typ) :: get_type_family_conversion_chain env subst_typ + | Ok None | Error _ -> helper insts' (num + 1) + ) + | _ -> [] in + helper insts 0 + +and get_type_family_conversion_chain env family_typ = + match family_typ.it with + | VarT (id, args) -> + (match (Env.find_opt_typ env id) with + | Some (_, insts) when check_type_family insts -> + get_chain_from_inst id env family_typ args insts + | _ -> [] + ) + | IterT (typ, _) -> get_type_family_conversion_chain env typ + | _ -> [] + +let make_projection_family_data env (lst : family_data list) (base_exp : exp) = + List.fold_right (fun (id, quants, subst, case_num, family_typ, sub_typ, _) exp -> + let proj_id = proj_name id case_num in + let new_args = List.map make_arg_from_param quants |> Subst.subst_list Subst.subst_arg subst in + let sub_typ' = Subst.subst_typ subst sub_typ in + let opt_typ = IterT (sub_typ', Opt) $ sub_typ'.at in + let calle = CallE (proj_id, new_args @ [(ExpA exp) $ exp.at]) in + (if has_one_inst env family_typ then calle else TheE (calle $$ exp.at % opt_typ)) $$ exp.at % sub_typ' + ) lst base_exp + +let make_constructor_family_data (lst : family_data list) (base_exp : exp) = + List.fold_left (fun exp (id, quants, subst, case_num, family_typ, sub_typ, orig_sub_typ) -> + let new_args = List.map make_arg_from_param quants |> Subst.subst_list Subst.subst_arg subst in + let tupe = construct_tuple_exp base_exp.at exp sub_typ orig_sub_typ quants new_args in + CaseE (constructor_name_mixop id (List.length quants + 1) case_num, tupe, Unchecked) $$ base_exp.at % family_typ + ) base_exp lst + +let handle_iter_typ base_exp real_typ expected_typ = + let rec go real_typ expected_typ num = + match real_typ.it, expected_typ.it, num with + | IterT (t, iter), IterT (t', iter'), _ when Eq.eq_iter iter iter' -> + let (iters, e, t1, t2) = go t t' (num + 1) in + (iter :: iters, e, t1, t2) + | _, _, 0 -> + ([], base_exp, real_typ, expected_typ) + | _, _, _ -> + let id = iter_var_name ^ Int.to_string 0 $ base_exp.at in + ([], VarE id $$ id.at % real_typ, real_typ, expected_typ) + in + go real_typ expected_typ 0 + +let apply_iteration iters (base_exp : exp) converted_exp real_typ = + let length = List.length iters in + (* The iterated variables keep the real type, while the iteration itself has the converted type *) + let rec go iters num = + match iters with + | [] -> (real_typ, converted_exp.note, converted_exp) + | iter :: iters' -> + let (r_typ, c_typ, iter_e) = go iters' (num - 1) in + let old_id = iter_var_name ^ Int.to_string num $ converted_exp.at in + let new_id = iter_var_name ^ Int.to_string (num - 1) $ converted_exp.at in + let r_iter_typ = IterT (r_typ, iter) $ converted_exp.at in + let c_iter_typ = IterT (c_typ, iter) $ converted_exp.at in + let new_exp = if num = length then base_exp else VarE old_id $$ converted_exp.at % r_iter_typ in + r_iter_typ, c_iter_typ, IterE (iter_e, (iter, [new_id, new_exp])) $$ converted_exp.at % c_iter_typ + in + let (_, _, e) = go iters length in + e + +let rec simplify_conversions proj_list constructor_list = + match proj_list, constructor_list with + | [], cs -> ([], cs) + | ps, [] -> (ps, []) + | (id, _, _, n1, family_typ, sub_typ, _) :: ps, (id', _, _, n2, family_typ', sub_typ', _):: cs when + Eq.eq_id id id' && + Eq.eq_typ family_typ family_typ' && + Eq.eq_typ sub_typ sub_typ' && + n1 = n2 -> + simplify_conversions ps cs + | p :: ps, c :: cs -> + let ps', cs' = simplify_conversions ps cs in + (p :: ps', c :: cs') + +let apply_conversion env exp real_typ expected_typ = + let reduced_r_typ = reduce_type_aliasing env real_typ in + let reduced_e_typ = reduce_type_aliasing env expected_typ in + let (iters, iter_exp, r_typ, e_typ) = handle_iter_typ exp reduced_r_typ reduced_e_typ in + if (is_family_typ env r_typ || is_family_typ env e_typ) + then ( + let proj_list = get_type_family_conversion_chain env r_typ in + let constructor_list = get_type_family_conversion_chain env e_typ in + let p_list, c_list = simplify_conversions (List.rev proj_list) (List.rev constructor_list) in + if p_list = [] && c_list = [] then exp else + let real_exp = { iter_exp with note = r_typ } in + let real_base_exp = { exp with note = reduced_r_typ } in + let converted_exp = make_constructor_family_data c_list (make_projection_family_data env p_list real_exp) in + if iters = [] then converted_exp else + apply_iteration iters real_base_exp converted_exp r_typ + ) + else exp + +let add_iter_ids_to_map env id_exp_pairs quant_map = + List.fold_left (fun acc (id, e') -> + let r_typ = + get_real_typ_from_exp quant_map env e' |> + reduce_type_aliasing env |> + remove_iter_from_type + in + StringMap.add id.it ([], r_typ) acc + ) quant_map id_exp_pairs + +let rec transform_iter quant_map env i = + match i with + | ListN (exp, id_opt) -> ListN (transform_exp quant_map env exp, id_opt) + | _ -> i + +and transform_typ quant_map env t = + (match t.it with + | VarT (id, args) -> VarT (id, List.map (transform_arg quant_map env) args) + | TupT id_typ_pairs -> TupT (List.map (fun (id, t) -> (id, transform_typ quant_map env t)) id_typ_pairs) + | IterT (typ, iter) -> IterT (transform_typ quant_map env typ, transform_iter quant_map env iter) + | typ -> typ + ) $ t.at + +and transform_exp quant_map env e = + let t_func = transform_exp quant_map env in + let typ = transform_typ quant_map env e.note in + let t_e = (match e.it with + | CaseE (m, e1, ch) -> CaseE (m, t_func e1, ch) + | CallE (fun_id, fun_args) -> CallE (fun_id, List.map (transform_arg quant_map env) fun_args) + | UnE (unop, optyp, e1) -> + UnE (unop, optyp, t_func e1) + | BinE (binop, optyp, e1, e2) -> + BinE (binop, optyp, t_func e1, t_func e2) + | CmpE (cmpop, optyp, e1, e2) -> + CmpE (cmpop, optyp, t_func e1, t_func e2) + | IterE (e1, (iter, id_exp_pairs)) -> + let new_quant_map = add_iter_ids_to_map env id_exp_pairs quant_map in + let t_e1 = transform_exp new_quant_map env e1 in + IterE (t_e1, (transform_iter new_quant_map env iter, List.map (fun (id, exp) -> (id, {exp with note = get_real_typ_from_exp quant_map env exp})) id_exp_pairs)) + | TupE (exps) -> TupE (List.map t_func exps) + | ListE exps -> ListE (List.map t_func exps) + | ProjE (e1, n) -> ProjE (t_func e1, n) + | UncaseE (e1, m) -> UncaseE (t_func { e1 with note = reduce_typ env e1.note }, m) + | OptE e1 -> OptE (Option.map t_func e1) + | TheE e1 -> TheE (t_func e1) + | StrE (fields, ch) -> StrE (List.map (fun (a, e1) -> (a, t_func e1)) fields, ch) + | DotE (e1, a) -> DotE (t_func e1, a) + | CompE (e1, e2) -> CompE (t_func e1, t_func e2) + | LiftE e1 -> LiftE (t_func e1) + | MemE (e1, e2) -> MemE (t_func e1, t_func e2) + | LenE e1 -> LenE e1 + | CatE (e1, e2) -> CatE (t_func e1, t_func e2) + | IdxE (e1, e2) -> IdxE (t_func e1, t_func e2) + | SliceE (e1, e2, e3) -> SliceE (t_func e1, t_func e2, t_func e3) + | IfE (e1, e2, e3) -> IfE (t_func e1, t_func e2, t_func e3) + | UpdE (e1, p, e2) -> UpdE (t_func e1, transform_path quant_map env p, t_func e2) + | ExtE (e1, p, e2) -> ExtE (t_func e1, transform_path quant_map env p, t_func e2) + | CvtE (e1, nt1, nt2) -> CvtE (t_func e1, nt1, nt2) + | SubE (e1, t1, t2) -> SubE (t_func e1, transform_typ quant_map env t1, transform_typ quant_map env t2) + | exp -> exp + ) $$ e.at % typ in + let real_type = get_real_typ_from_exp quant_map env t_e in + let expected_type = typ in + if (check_type_equality env real_type expected_type) then t_e else apply_conversion env t_e real_type expected_type + +and transform_path quant_map env p = + (match p.it with + | RootP -> RootP + | IdxP (p, e) -> IdxP (transform_path quant_map env p, transform_exp quant_map env e) + | SliceP (p, e1, e2) -> SliceP (transform_path quant_map env p, transform_exp quant_map env e1, transform_exp quant_map env e2) + | DotP (p, a) -> DotP (transform_path quant_map env p, a) + ) $$ p.at % (transform_typ quant_map env p.note) + +and transform_sym quant_map env s = + (match s.it with + | VarG (id, args) -> VarG (id, List.map (transform_arg quant_map env) args) + | SeqG syms | AltG syms -> SeqG (List.map (transform_sym quant_map env) syms) + | RangeG (syml, symu) -> RangeG (transform_sym quant_map env syml, transform_sym quant_map env symu) + | IterG (sym, (iter, id_exp_pairs)) -> IterG (transform_sym quant_map env sym, (transform_iter quant_map env iter, + List.map (fun (id, exp) -> (id, transform_exp quant_map env exp)) id_exp_pairs) + ) + | AttrG (e, sym) -> AttrG (transform_exp quant_map env e, transform_sym quant_map env sym) + | sym -> sym + ) $ s.at + +and transform_arg quant_map env a = + (match a.it with + | ExpA exp -> ExpA (transform_exp quant_map env exp) + | TypA typ -> TypA (transform_typ quant_map env typ) + | DefA id -> DefA id + | GramA sym -> GramA (transform_sym quant_map env sym) + ) $ a.at + +and transform_param env p = + (match p.it with + | ExpP (id, typ) -> ExpP (id, transform_typ StringMap.empty env typ) + | TypP id -> TypP id + | DefP (id, params, typ) -> DefP (id, List.map (transform_param env) params, transform_typ StringMap.empty env typ) + | GramP (id, params, typ) -> GramP (id, List.map (transform_param env) params, transform_typ StringMap.empty env typ) + ) $ p.at + +let rec transform_prem quant_map env prem = + let new_quant_map, prem' = + match prem.it with + | RulePr (id, args, m, e) -> + quant_map, + RulePr (id, List.map (transform_arg quant_map env) args, m, transform_exp quant_map env e) + | IfPr e -> quant_map, IfPr (transform_exp quant_map env e) + | LetPr (quants, e1, e2) -> + let new_quant_map = extend_quant_set quant_map quants in + new_quant_map, + LetPr (List.map (transform_param env) quants, transform_exp new_quant_map env e1, transform_exp quant_map env e2) + | ElsePr -> quant_map, ElsePr + | IterPr (prem1, (iter, id_exp_pairs)) -> + let new_quant_map = add_iter_ids_to_map env id_exp_pairs quant_map in + quant_map, + IterPr (snd (transform_prem new_quant_map env prem1), + (transform_iter new_quant_map env iter, List.map (fun (id, exp) -> (id, transform_exp new_quant_map env exp)) id_exp_pairs) + ) + | NegPr prem1 -> quant_map, NegPr (snd (transform_prem quant_map env prem1)) + in new_quant_map, prem' $ prem.at + +let rec transform_prems quant_map env = function + | [] -> quant_map, [] + | prem::prems -> + let new_quant_map, new_prem = transform_prem quant_map env prem in + let new_new_quant_map, new_prems = transform_prems new_quant_map env prems in + new_new_quant_map, new_prem::new_prems + +let transform_rule env rule = + match rule.it with + | RuleD (id, quants, m, exp, prems) -> + let quant_map = make_quant_set quants in + let new_quant_map, new_prems = transform_prems quant_map env prems in + RuleD (id, + List.map (transform_param env) quants, + m, + transform_exp new_quant_map env exp, + new_prems + ) $ rule.at + +(* Reducing quants as conversion functions actively change the type of variables when matching *) +let reduce_quant env q = + match q.it with + | ExpP (id, typ) -> ExpP (id, reduce_typ env typ) $ q.at + | _ -> q + +let transform_clause _id params env rt clause = + match clause.it with + | DefD (quants, args, exp, prems) -> + let subst = create_arg_param_subst args params in + let reduced_quants = List.map (reduce_quant env) quants in + let quant_map = make_quant_set reduced_quants in + let new_quant_map, new_prems = transform_prems quant_map env prems in + let t_exp = transform_exp new_quant_map env exp in + let real_typ = get_real_typ_from_exp new_quant_map env t_exp in + let s_rt = Subst.subst_typ subst rt in + let new_exp = if check_type_equality env real_typ s_rt then t_exp else apply_conversion env t_exp real_typ s_rt in + DefD ((List.map (transform_param env) reduced_quants), + List.map (transform_arg quant_map env) args, + new_exp, + new_prems + ) $ clause.at + +let transform_prod env prod = + (match prod.it with + | ProdD (quants, sym, exp, prems) -> + let quant_map = make_quant_set quants in + let new_quant_map, new_prems = transform_prems quant_map env prems in + ProdD (List.map (transform_param env) quants, + transform_sym quant_map env sym, + transform_exp new_quant_map env exp, + new_prems + ) + ) $ prod.at + +let transform_deftyp env deftyp = + (match deftyp.it with + | AliasT typ -> AliasT (transform_typ StringMap.empty env typ) + | StructT typfields -> StructT (List.map (fun (a, (t, qs, prems), hints) -> + let quant_map = make_quant_set qs in + let _, new_prems = transform_prems quant_map env prems in + (a, (transform_typ quant_map env t, List.map (transform_param env) qs, new_prems), hints)) typfields) + | VariantT typcases -> VariantT (List.map (fun (m, (t, qs, prems), hints) -> + let quant_map = make_quant_set qs in + let _, new_prems = transform_prems quant_map env prems in + (m, (transform_typ quant_map env t, List.map (transform_param env) qs, new_prems), hints)) typcases) + ) $ deftyp.at + +let transform_inst env inst = + match inst.it with + | (InstD (quants, args, deftyp)) -> + [InstD (List.map (transform_param env) quants, List.map (transform_arg StringMap.empty env) args, transform_deftyp env deftyp) $ inst.at] + +(* Creates new TypD's for each StructT and VariantT *) +let create_types id inst = + match inst.it with + | InstD (quants, _, deftyp) -> + (match deftyp.it with + | AliasT _ -> [] + | StructT _ | VariantT _ -> + let inst = InstD (quants, List.map make_arg quants, deftyp) $ inst.at in + [TypD (id.it ^ sub_type_name_quants quants $ id.at, quants, [inst])] + ) + +let rec transform_def env def = + (match def.it with + | TypD (id, params, insts) -> + let new_insts = List.concat_map (transform_inst env) insts in + TypD (id, List.map (transform_param env) params, new_insts) + | RecD defs -> RecD (List.map (transform_def env) defs) + | RelD (id, params, m, typ, rules) -> + RelD (id, List.map (transform_param env) params, m, transform_typ StringMap.empty env typ, List.map (transform_rule env) rules) + | DecD (id, params, typ, clauses) -> + DecD (id, List.map (transform_param env) params, transform_typ StringMap.empty env typ, List.map (transform_clause id params env typ) clauses) + | GramD (id, params, typ, prods) -> + GramD (id, List.map (transform_param env) params, transform_typ StringMap.empty env typ, List.map (transform_prod env) prods) + | d -> d + ) $ def.at + +let gen_family_projections id has_one_inst case_num inst = + match inst.it with + | InstD (quants, args, deftyp) -> + match deftyp.it with + | AliasT typ -> + let family_typ = VarT(id, args) $ id.at in + let return_type = if has_one_inst then typ else IterT (typ, Opt) $ id.at in + let new_param = ExpP (var_typ_fam $ id.at, family_typ) $ id.at in + let new_quant = ExpP (var_typ_fam $ id.at, typ) $ id.at in + let var_exp = VarE (var_typ_fam $ id.at) $$ id.at % typ in + let opt_exp = OptE (Some (var_exp)) $$ id.at % return_type in + let new_args = List.map make_arg_from_param quants in + let new_case = CaseE(constructor_name_mixop id (List.length quants + 1) case_num, construct_tuple_exp deftyp.at var_exp typ typ quants new_args, Unchecked) $$ id.at % family_typ in + + let return_exp = if has_one_inst then var_exp else opt_exp in + let new_clause = DefD (quants @ [new_quant], new_args @ [ExpA new_case $ id.at], return_exp, []) $ id.at in + + let extra_quant = ExpP (var_typ_fam $ id.at, family_typ) $ id.at in + let extra_arg = ExpA (VarE (var_typ_fam $ id.at) $$ id.at % family_typ) $ id.at in + let none_exp = OptE (None) $$ id.at % return_type in + let extra_clause = DefD (quants @ [extra_quant], new_args @ [extra_arg], none_exp, []) $ id.at in + let clauses = new_clause :: if has_one_inst then [] else [extra_clause] in + let fun_id = proj_name id case_num in + fun_id, DecD (fun_id, quants @ [new_param], return_type, clauses) + | _ -> error inst.at "Type Family of variant or records should not exist" (* This should never occur *) + +let rec create_types_from_instances def = + (match def.it with + | TypD (id, params, [inst]) when check_normal_type_creation inst -> [TypD (id, params, [inst])] + | TypD (id, params, insts) -> let types = List.concat_map (create_types id) insts in + let transformed_instances = List.map (fun inst -> match inst.it with + | InstD (quants, args, {it = StructT _; at; _}) | InstD (quants, args, {it = VariantT _; at; _}) -> + InstD (quants, args, AliasT (VarT (id.it ^ sub_type_name_quants quants $ id.at, List.map make_arg quants) $ id.at) $ at) $ inst.at + | _ -> inst + ) insts in + types @ [TypD(id, params, transformed_instances)] + | RecD defs -> [RecD (List.concat_map create_types_from_instances defs)] + | d -> [d] + ) |> List.map (fun d -> d $ def.at) + +let rec transform_type_family def = + (match def.it with + | TypD (id, params, [inst]) when check_normal_type_creation inst -> [TypD (id, params, [inst])] + | TypD (id, params, insts) -> + let deftyp = VariantT (List.mapi (fun case_num inst -> match inst.it with + | InstD (quants, args, {it = AliasT typ; _}) -> + let tupt = construct_tuple_typ typ quants id.at in + let prems = List.map2 (fun a p -> + let var_param = (match p.it with + | ExpP (id', typ') -> VarE id' $$ id'.at % typ' + | _ -> error id.at "Removal of other arguments is not supported yet" + ) in + let exp_arg = (match a.it with + | ExpA exp -> exp + | _ -> error id.at "Removal of other arguments is not supported yet" + ) in + let cmp_exp = CmpE (`EqOp, `BoolT, var_param, exp_arg) $$ id.at % (BoolT $ id.at) in + IfPr cmp_exp $ id.at + ) args params in + (constructor_name_mixop id (List.length quants + 1) case_num, (tupt, [], prems), []) + | _ -> error def.at "Should be type alias" + ) insts) $ def.at in + let inst = InstD (params, List.map make_arg_from_param params, deftyp) $ def.at in + let one_inst = match insts with + | [_] -> true + | _ -> false + in + let proj_ids, projections = List.split (List.mapi (gen_family_projections id one_inst) insts) in + + let hintdefs = List.map (fun id -> HintD (DecH (id, [projection_hint]) $ def.at)) proj_ids in + TypD (id, params, [inst]) :: projections @ hintdefs + | RecD defs -> [RecD (List.concat_map transform_type_family defs)] + | d -> [d] + ) |> List.map (fun d -> d $ def.at) + +let transform (il : script): script = + let il_transformed = List.concat_map create_types_from_instances il in + let env = Env.env_of_script il_transformed in + List.map (transform_def env) il_transformed |> + List.concat_map transform_type_family \ No newline at end of file diff --git a/spectec/src/middlend/typefamilyremoval.mli b/spectec/src/middlend/typefamilyremoval.mli new file mode 100644 index 0000000000..9deda302c9 --- /dev/null +++ b/spectec/src/middlend/typefamilyremoval.mli @@ -0,0 +1,51 @@ +(* +This transformation transforms type families into a single variant user-defined +type. + +This is achieved through the following steps: + * Transform variant and struct instances of the type family into their own + user-defined type, using the quantifiers as their respective dependent type arguments. + * Transform the type family itself as a variant type with many as many cases as there + were instances before, encoding the pattern matching as equality premises. + * Projection functions are made for each instance that go from type family to the + sub type. + * Implicit conversions going from type family to sub type and vice-versa are made + explicit through the use of the constructor and projections made before. This is achieved + by inspecting the expression and generating its "real type", and match that to the type + given by elaboration. + +As an example, +given the following type family: + +syntax foo(p) +syntax foo{v : t}(a) = t_alias(a) +syntax foo{v : t}(b) = | case_1 | case_2 | ... | case_n +syntax foo{v : t}(c) = { field_1, field_2, ... , field_n } + +where p is a parameter type, a, b and c are arguments that match their respective parameter type, +v is a quantifier that appears in a, b, and c with type t. + +This is transformed into: + +syntax foo_case_2(v : t) = | case_1 | case_2 | ... | case_n +syntax foo_case_3(v : t) = { field_1, field_2, ... , field_n } + +syntax foo(p) = + | foo_make_case_1{v : t, x : t_alias(a)}(v : t, x : t_alias(a)) + -- if a == p + | foo_make_case_2{v : t, x : foo_case_2(b)}(v : t, x : foo_case_2(b)) + -- if b == p + | foo_make_case_3{v : t, x : foo_case_3(c)}(v : t, x : foo_case_2(c)) + -- if c == p + +an example of the projection function is as follows: + +def $proj_foo_case_1(v : t, x : foo(a)) : t_alias(a)? +def $proj_foo_case_1{v : t, x : t_alias(a)}(v, foo_make_case_1(v, x)) = ?(x) +def $proj_foo_case_1{v : t, x : foo(a)}(v, x) = ?() + +Names were specifically chosen here for simplicity. +*) + +val projection_hint_id : string +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/uncaseremoval.ml b/spectec/src/middlend/uncaseremoval.ml new file mode 100644 index 0000000000..d22dbd491c --- /dev/null +++ b/spectec/src/middlend/uncaseremoval.ml @@ -0,0 +1,186 @@ +open Il.Ast +open Il +open Il.Walk +open Util.Source + +module StringMap = Map.Make(String) +type uncase_map = (mixop list) StringMap.t + +type env = { + mutable uncase_map : uncase_map; + mutable env : Il.Env.t; +} + +let empty_env = { + uncase_map = StringMap.empty; + env = Il.Env.empty +} + +let error at msg = Util.Error.error at "uncase-removal" msg + +let var_prefix = "v_" +let proj_prefix = "proj_" + +let get_case_typs t = + match t.it with + | TupT typs -> typs + | _ -> [("_" $ t.at, t)] + +let iter_name i = + match i with + | Opt -> "opt" + | List | List1 | ListN _ -> "list" + +let rec typ_name t = + match t.it with + | VarT (id, _) -> id.it + | BoolT -> "bool" + | NumT _ -> "num" + | TextT -> "str" + | TupT pairs -> String.concat "__" (List.map (fun (_, t) -> typ_name t) pairs) ^ "_pair" + | IterT (typ, iter) -> typ_name typ ^ "_" ^ iter_name iter + +let make_arg p = + (match p.it with + | ExpP (id, typ) -> ExpA (VarE id $$ id.at % typ) + | TypP id -> TypA (VarT (id, []) $ id.at) (* TODO unsure this makes sense*) + | DefP (id, _, _) -> DefA id + | GramP (_, _, _) -> assert false (* Avoid this *) + ) $ p.at + +let reduce_typ env typ = + let Ok typ' | Error typ' = Eval.reduce_typ env typ in typ' + +let create_projection_functions id params mixops inst = + let get_deftyp inst' = (match inst'.it with + | InstD (_quants, _args, deftyp) -> deftyp.it + ) in + let at = inst.at in + let user_typ = VarT (id, List.map make_arg params) $ at in + let param_ids = List.map (fun p -> (Utils.get_param_id p).it) params in + let fresh_name = Utils.generate_var param_ids "x" in + let new_param = ExpP (fresh_name $ at, user_typ) $ at in + let make_func m case_typs has_one_case idx = + let new_var_exps = List.mapi (fun idx (_, t) -> VarE (var_prefix ^ typ_name t ^ "_" ^ Int.to_string idx $ at) $$ at % t) case_typs in + let tupt = TupT case_typs $ at in + let no_name_tupt = TupT (List.map (fun (e, t) -> "_" $ e.at, t) case_typs) $ at in + let new_tup = TupE (new_var_exps) $$ at % tupt in + let new_case_exp = CaseE(m, new_tup, Unchecked) $$ at % user_typ in + + let new_params = params @ [new_param] in + let new_quants = List.mapi (fun idx (_, t) -> ExpP (var_prefix ^ typ_name t ^ "_" ^ Int.to_string idx $ at, t) $ at) case_typs in + let new_arg = ExpA new_case_exp $ at in + if has_one_case then + let clause = DefD (params @ new_quants, List.map make_arg params @ [new_arg], new_tup, []) $ at in + DecD ((proj_prefix ^ id.it ^ "_" ^ Int.to_string idx) $ id.at, new_params, no_name_tupt, [clause]) + else + (* extra handling in case that it has more than one case *) + let extra_arg = ExpA (VarE (fresh_name $ at) $$ at % user_typ) $ at in + let new_quant = ExpP (fresh_name $ at, user_typ) $ at in + let opt_type = IterT (no_name_tupt, Opt) $ at in + let none_exp = OptE (None) $$ at % no_name_tupt in + let opt_tup = OptE (Some new_tup) $$ at % opt_type in + let clause' = DefD (params @ new_quants, List.map make_arg params @ [new_arg], opt_tup, []) $ at in + let extra_clause = DefD (params @ new_quants @ [new_quant], List.map make_arg params @ [extra_arg], none_exp, []) $ at in + DecD ((proj_prefix ^ id.it ^ "_" ^ Int.to_string idx) $ id.at, new_params, opt_type, [clause'; extra_clause]) + in + + List.map (fun m -> + (match (get_deftyp inst) with + (* Should not happen due to reduction while collecting uncase expressions *) + | AliasT _typ -> error inst.at "Found type alias while constructing projection functions, should not happen" + (* Should not be allowed since struct does not have cases *) + | StructT _ -> error inst.at "Found struct construction while constructing projection functions, should not happen" + | VariantT typcases -> + let mixop_opt = List.find_map (fun (i, (m', (t, _, _), _)) -> + if not (Eq.eq_mixop m m') then None else + Some (i, m, t) + ) (List.mapi (fun i t -> (i, t)) typcases) in + begin match mixop_opt with + | Some (i, m, t) -> make_func m (get_case_typs t) (List.length typcases = 1) i + | None -> + error inst.at ("Could not find mixop " ^ Il.Print.string_of_mixop m ^ + " while constructing projection functions") + end + ) + ) mixops + +let get_proj_info p_env m id = + let opt = Env.find_opt_typ p_env.env (id $ no_region) in + match opt with + | Some (_, [{it = InstD(_, _, {it = VariantT typcases; _}); _}]) -> + List.find_map (fun (i, (m', (t, _, _), _)) -> + if Eq.eq_mixop m m' then Some (i, t) else None + ) (List.mapi (fun i t -> (i, t)) typcases) |> + Option.map (fun (i, t) -> (i, t, List.length typcases = 1)) + | _ -> None + +let transform_tuple_type t = + match t.it with + | TupT ts -> TupT (List.map (fun (id, t) -> ("_" $ id.at, t)) ts) $ t.at + | _ -> t + +let t_exp p_env e = + match e.it with + | UncaseE (exp, m) -> + (* Supplying the projection function for UncaseE removal *) + let typ = reduce_typ p_env.env exp.note in + let typ_name = Print.string_of_typ_name typ in + let proj_info_opt = get_proj_info p_env m typ_name in + let args = (match typ.it with + | VarT (_, args) -> args + | _ -> error e.at ("Found non-variable type in uncase expression: " ^ Il.Print.string_of_typ typ) + ) in + let args' = args @ [ExpA exp $ e.at] in + let fun_id idx = proj_prefix ^ typ_name ^ "_" ^ Int.to_string idx $ e.at in + begin match proj_info_opt with + | Some (idx, _, true) -> { e with it = CallE (fun_id idx, args') } + | Some (idx, t, false) -> + let call_typ = IterT (transform_tuple_type t, Opt) $ e.at in + { e with it = TheE (CallE (fun_id idx, args') $$ e.at % call_typ) } + | None -> error e.at ("Could not find mixop: " ^ Il.Print.string_of_mixop m) + end + | _ -> e + +let t_def p_env def = + let t = { base_transformer with transform_exp = t_exp p_env} in + (match def.it with + | TypD (id, params, [inst]) -> + let d = TypD (id, List.map (transform_param t) params, [transform_inst t inst]) in + (match (StringMap.find_opt id.it p_env.uncase_map) with + | None -> [d] + | Some ms -> d :: create_projection_functions id params ms inst + ) + | _ -> [ (transform_def t def).it ] + ) |> List.map (fun d -> d $ def.at) + +let collect_uncase_iter env: uncase_map ref * (module Iter.Arg) = + let module Arg = + struct + include Iter.Skip + let acc = ref StringMap.empty + let visit_exp (exp : exp) = + match exp.it with + | UncaseE(e, m) -> + let typ_name = Print.string_of_typ_name (reduce_typ env e.note) in + acc := StringMap.update typ_name (fun int_set_opt -> match int_set_opt with + | None -> Some [m] + | Some ms -> + Some (if List.mem m ms then ms else m :: ms) + ) !acc + | _ -> () + end + in Arg.acc, (module Arg) + +let transform (il : script): script = + let p_env = empty_env in + p_env.env <- Il.Env.env_of_script il; + + (* Building up uncase_map *) + let acc, (module Arg : Iter.Arg) = collect_uncase_iter p_env.env in + let module Acc = Iter.Make(Arg) in + List.iter Acc.def il; + p_env.uncase_map <- !acc; + + (* Main transformation *) + List.concat_map (t_def p_env) il \ No newline at end of file diff --git a/spectec/src/middlend/uncaseremoval.mli b/spectec/src/middlend/uncaseremoval.mli new file mode 100644 index 0000000000..210d82435f --- /dev/null +++ b/spectec/src/middlend/uncaseremoval.mli @@ -0,0 +1,48 @@ +(* +This transformation focuses on transforming uncase expressions into explicit projection functions. + +This is achieved through the following steps: + * The uncase expressions are collected and placed in a map (as a first pass). This is a map from id + to a list of mixops. + * When encountering a user defined type definition, we lookup in the map and generate + the projection functions accordingly for each mixop in the list. If there is more than one case, + the projection function returns the case tuple wrapped in an optional type. + * When encountering an uncase expression, we just simply make the appropriate transformation + to a function call. + +This pass works with/without dependent types. It will simply add the dependent type parameters +to the projection function whenver necessary. + +As an example, +given the following type: + +syntax foo = + | A v + | B c v + +where A and B are case constructors, and v c are types. + +Assume we have uncase expressions somewhere in our script (with x being a variable of type foo): +(x!A).0 and (x!B).1 + +This is transformed into: + +syntax foo = + | A v + | B c v + +def $proj_foo_0(x : foo) : (v)? + def $proj_foo_0{var : v}(A(var)) = ?(var) + def $proj_foo_0{var : foo}(var) = ?() + +def $proj_foo_1(x : foo) : (c, v)? + def $proj_foo_0{v_c : c, v_v : v}(B(v_c, v_v)) = ?((v_c, v_v)) + def $proj_foo_0{var : foo}(var) = ?() + +with uncase expressions being transformed into: +(the($proj_foo_0(x))).0 and (the($proj_foo_1(x))).1 + +Names were specifically chosen here for simplicity. +*) + +val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/undep.ml b/spectec/src/middlend/undep.ml new file mode 100644 index 0000000000..1b8d03988c --- /dev/null +++ b/spectec/src/middlend/undep.ml @@ -0,0 +1,417 @@ +open Il.Ast +open Util.Source +open Util.Error +open Il +open Il.Walk +open Util + +module StringSet = Set.Make(String) + +type env = { + mutable wf_set : StringSet.t; + mutable proj_set : StringSet.t; + mutable il_env : Il.Env.t; +} + +let empty () = { + wf_set = StringSet.empty; + proj_set = StringSet.empty; + il_env = Il.Env.empty +} + +let wf_pred_prefix = "wf_" +let rule_prefix = "case_" + +let wf_hint_id = "wf-relation" + +(* flag that deactivates adding wellformedness predicates to relations *) +let deactivate_wfness = false + +let error at msg = error at "Undep error" msg + +let rec split3concat = function + [] -> ([], [], []) + | (x,y, z)::l -> + let (rx, ry, rz) = split3concat l in + (x @ rx, y @ ry, z @ rz) + +let remove_last_char s = + if not (String.ends_with ~suffix:"*" s || String.ends_with ~suffix:"?" s) then s else + let len = String.length s in + if len = 0 then s + else String.sub s 0 (len - 1) + +let bind_wf_set env id = + if id <> "" && id <> "_" then + env.wf_set <- StringSet.add id env.wf_set + +let is_part_of_quant (free_set : Free.sets) p = + match p.it with + | ExpP (id, _) -> Free.Set.mem id.it free_set.varid + | TypP id -> Free.Set.mem id.it free_set.typid + | DefP (id, _, _) -> Free.Set.mem id.it free_set.defid + | GramP (id, _, _) -> Free.Set.mem id.it free_set.gramid + +let is_type_arg arg = + match arg.it with + | TypA _ -> true + | _ -> false + +let is_type_param param = + match param.it with + | TypP _ -> true + | _ -> false + +let check_iter free_set iter = + match iter with + | ListN (_, Some id) -> Free.Set.mem id.it free_set + | _ -> false + +let filter_iter_quants exp iter_quants = + let free_vars = (Free.free_exp exp).varid in + (List.fold_left (fun (free_set, acc) (iter, id_exp_pairs) -> + let has_definite_iter = check_iter free_set iter in + + let new_id_exp_pairs = List.filter (fun (id, _) -> + Free.Set.mem id.it free_set + ) id_exp_pairs in + + (* Must preserve iteration if the iteration variable (i.e. i) is used, + * EVEN if the list itself is not being used. + *) + let new_id_exp_pairs' = if has_definite_iter then id_exp_pairs else + new_id_exp_pairs + in + + if new_id_exp_pairs' = [] && (not has_definite_iter) then (free_set, acc) else + let iter_vars = List.fold_left (fun acc (_, e) -> + Free.Set.union acc (Free.free_exp e).varid + ) Free.Set.empty new_id_exp_pairs' in + let new_set = Free.Set.union iter_vars free_set in + (new_set, (iter, new_id_exp_pairs') :: acc) + ) (free_vars, []) iter_quants) + |> snd |> List.rev + +let rec create_collector iterexps = + let base_collector_iters: ((exp * typ) * iterexp list) list collector = base_collector [] (@) in + { base_collector_iters with collect_exp = collect_userdef_exp iterexps; collect_prem = collect_userdef_prem iterexps } + +and collect_userdef_exp iterexps e = + match e.it with + | CaseE _ | StrE _ -> ([((e, e.note), filter_iter_quants e iterexps)], false) + | IterE (e1, ((_, id_exp_pairs) as iterexp)) -> + let c1 = create_collector iterexps in + let c2 = create_collector (iterexp :: iterexps) in + (collect_exp c2 e1 @ + List.concat_map (fun (_, exp) -> collect_exp c1 exp) id_exp_pairs, false) + | _ -> ([], true) + +and collect_userdef_prem iterexps p = + match p.it with + | IterPr (p', ((_, id_exp_pairs) as iterexp)) -> + let c1 = create_collector iterexps in + let c2 = create_collector (iterexp :: iterexps) in + (collect_prem c2 p' @ + List.concat_map (fun (_, exp) -> collect_exp c1 exp) id_exp_pairs, false) + | _ -> ([], true) + +and t_typ t = + (match t.it with + | VarT (id, args) -> VarT (id, List.filter is_type_arg args) + | typ -> typ + ) $ t.at + +and t_exp env e = + (match e.it with + (* Remove every arg but last for family projections *) + | CallE (id, args) when StringSet.mem id.it env.proj_set && args <> [] -> + CallE (id, [(Lib.List.last args)]) + (* HACK - Change IterE of option with no iteration variable into a OptE *) + | IterE (e1, (Opt, [])) -> + OptE (Some e1) + | exp -> exp + ) $$ e.at % e.note + +let t_inst env inst = + let tf = { base_transformer with transform_exp = t_exp env; transform_typ = t_typ } in + (match inst.it with + | InstD (quants, args, deftyp) -> InstD (List.map (transform_param tf) quants |> List.filter is_type_param, List.map (transform_arg tf) args |> List.filter is_type_arg, + (match deftyp.it with + | AliasT typ -> AliasT (transform_typ tf typ) + | StructT typfields -> StructT (List.map (fun (a, (typ, c_quants, _prems), hints) -> + (a, (transform_typ tf typ, List.map (transform_param tf) c_quants, []), hints) + ) typfields) + | VariantT typcases -> + VariantT (List.map (fun (m, (typ, c_quants, _prems), hints) -> + (m, (transform_typ tf typ, List.map (transform_param tf) c_quants, []), hints) + ) typcases) + ) $ deftyp.at + )) $ inst.at + +let needs_wfness env def = + match def.it with + | TypD (_, _, [{it = InstD (quants, _, deftyp); _}]) -> + let prems_list = match deftyp.it with + | StructT typfields -> List.map (fun (_, (_, _, prems), _) -> prems) typfields + | VariantT typcases -> List.map (fun (_, (_, _, prems), _) -> prems) typcases + | _ -> [] + in + List.exists (fun b -> match b.it with + | ExpP (id, _) -> StringSet.mem id.it env.wf_set + | _ -> false + ) quants || + List.exists (fun prems -> prems <> []) prems_list + | _ -> false + +let rec get_wf_pred env (exp, t) = + let get_id iter exp = + match exp.it with + | VarE id -> id + | _ -> + let s_iter = if iter = Opt then "?" else "*" in + let free_vars = (Free.free_exp exp).varid |> Free.Set.elements in + Utils.generate_var free_vars "iter" ^ s_iter $ exp.at + in + let t' = Utils.reduce_type_aliasing env.il_env t in + let exp' = {exp with note = t'} in + match t'.it with + | VarT (id, args) when StringSet.mem id.it env.wf_set -> + let new_mixop = Xl.Mixop.(Seq (List.init (List.length args + 1) (fun _ -> Arg ()))) in + let exp_args = List.filter_map (fun a -> match a.it with + | ExpA exp -> Some exp + | _ -> None + ) args in + let tupt = TupT (List.map (fun e -> "_" $ id.at, e.note) exp_args @ [("_" $ id.at, t')]) $ id.at in + let tuple_exp = TupE (exp_args @ [exp']) $$ id.at % tupt in + [RulePr (wf_pred_prefix ^ id.it $ id.at, [], new_mixop, tuple_exp) $ id.at] + | IterT (typ, iter) -> + let name = get_id iter exp' in + let name' = remove_last_char name.it $ name.at in + let prems = get_wf_pred env (VarE name' $$ name.at % typ, typ) in + List.map (fun prem -> IterPr (prem, (iter, [(name', exp')])) $ name.at) prems + | TupT exp_typ_pairs -> + let prems = + List.mapi (fun idx (_, typ) -> + get_wf_pred env (ProjE (exp', idx) $$ exp.at % typ, typ)) exp_typ_pairs |> + List.concat + in + prems + | _ -> [] + +let non_empty_var id = id.it <> "" && id.it <> "_" + +let get_exp_typ q = + match q.it with + | ExpP (id, typ) -> Some (VarE id $$ id.at % typ, typ) + | _ -> None + +let generate_well_formed_rel_hint at: hint = { hintid = wf_hint_id $ at; hintexp = El.Ast.SeqE [] $ at} + +let create_well_formed_predicate env id inst = + let tf = { base_transformer with transform_exp = t_exp env; transform_typ = t_typ} in + let at = id.at in + let user_typ = VarT(id, []) $ at in + let new_mixop pairs = Xl.Mixop.(Seq (List.init (List.length pairs + 1) (fun _ -> Arg ()))) in + let create_pairs quants = List.split (List.filter_map (fun b -> match b.it with + | ExpP (id', typ) -> Some (("_" $ id'.at, typ), (id', typ)) + | _ -> None + ) quants) in + let tupt pairs = TupT (pairs @ [("_" $ at, user_typ)]) $ at in + let hint = HintD (RelH (wf_pred_prefix ^ id.it $ id.at, [generate_well_formed_rel_hint at]) $ at) $ at in + match inst.it with + (* Variant well formedness predicate creation *) + | InstD (quants, _args, {it = VariantT typcases; _}) -> + let pairs_without_names, dep_exp_typ_pairs = create_pairs quants in + let rules = List.mapi (fun i (m, (case_typ, case_quants, prems), _) -> + let exp_typ_pairs = match case_typ.it with + | TupT tups -> tups + | _ -> [("_" $ id.at, case_typ)] + in + let extra_quants, t_pairs = Utils.improve_ids_quants [] true id.at exp_typ_pairs in + let new_quants = case_quants @ extra_quants in + let exp = match case_typ.it, t_pairs with + | TupT _, _ -> TupE (List.map (fun (id, t) -> VarE id $$ id.at % t) t_pairs) $$ at % (TupT t_pairs $ at) + | _, [(id', t)] -> VarE id' $$ id'.at % t + | _ -> error at "Non-tuple case type should have exactly one argument" + in + let case_exp = CaseE (m, exp, Unchecked) $$ at % user_typ in + let tuple_exp = TupE (List.map (fun (id, t) -> VarE id $$ id.at % t) dep_exp_typ_pairs @ [case_exp]) $$ at % tupt pairs_without_names in + let extra_prems = List.filter_map get_exp_typ new_quants |> List.concat_map (get_wf_pred env) in + RuleD (id.it ^ "_" ^ rule_prefix ^ Int.to_string i $ at, + List.map (transform_param tf) (quants @ new_quants), new_mixop dep_exp_typ_pairs, + transform_exp tf tuple_exp, + List.map (transform_prem tf) (extra_prems @ prems) + ) $ at + ) typcases + in + let has_no_prems = List.for_all (fun rule -> match rule.it with + | RuleD (_, _, _, _, prems) -> prems = [] + ) rules in + if has_no_prems then [] else + let relation = RelD (wf_pred_prefix ^ id.it $ id.at, [], new_mixop dep_exp_typ_pairs, tupt pairs_without_names, rules) $ at in + bind_wf_set env id.it; + [relation; hint] + + (* Struct/Record well formedness predicate creation *) + | InstD (quants, _args, {it = StructT typfields; _}) -> + let pairs_without_names, dep_exp_typ_pairs = create_pairs quants in + let atoms = List.map (fun (a, _, _) -> a) typfields in + let is_wrapped, pairs, rule_prems = split3concat (List.map (fun (_, (t, _, prems), _) -> + let tups, wrapped = match t.it with + | TupT tups when List.exists (fun (id, _) -> non_empty_var id) tups -> tups, true + | TupT [] -> [], false + | _ -> [("_" $ id.at, t)], false + in + ([wrapped], tups, prems) + ) typfields) in + + let (rule_quants, pairs') = Utils.improve_ids_quants [] true at pairs in + let new_prems = (List.filter_map get_exp_typ rule_quants |> List.concat_map (get_wf_pred env)) @ rule_prems in + let str_exp = StrE (List.map2 (fun a ((id, t), wrapped) -> + let tupt = TupT [(id, t)] $ at in + let tupe = TupE [VarE id $$ id.at % t] $$ at % tupt in + if wrapped then (a, tupe) else + (a, VarE id $$ id.at % t) + ) atoms (List.combine pairs' is_wrapped), Unchecked) $$ at % user_typ in + let tupe = TupE (List.map (fun (id, t) -> VarE id $$ id.at % t) dep_exp_typ_pairs @ [str_exp]) $$ at % tupt pairs_without_names in + let rule = RuleD (id.it ^ "_" ^ rule_prefix $ id.at, + List.map (transform_param tf) (quants @ rule_quants), + new_mixop dep_exp_typ_pairs, + tupe, + List.map (transform_prem tf) (new_prems)) $ at + in + + if new_prems = [] then [] else + let relation = RelD (wf_pred_prefix ^ id.it $ id.at, [], new_mixop dep_exp_typ_pairs, tupt pairs_without_names, [rule]) $ at in + bind_wf_set env id.it; + [relation; hint] + | _ -> [] + +let get_extra_prems env quants exp prems = + if deactivate_wfness then [] else + let cl = create_collector [] in + let wf_terms = collect_exp cl exp @ List.concat_map (collect_prem cl) prems in + let unique_terms = Util.Lib.List.nub (fun ((e1, _t1), iterexp1) ((e2, _t2), iterexp2) -> + Il.Eq.eq_exp e1 e2 && Il.Eq.eq_list Il.Eq.eq_iterexp iterexp1 iterexp2 + ) wf_terms in + + let more_prems = List.concat_map (fun (pair, iterexps) -> + List.map (fun prem' -> List.fold_left (fun acc iterexp -> + IterPr (acc, iterexp) $ acc.at + ) prem' iterexps) (get_wf_pred env pair) + ) unique_terms in + + (* Leverage the fact that the wellformed predicates are "bubbled up" and remove unnecessary wf preds*) + let free_vars = (Free.free_list Free.free_prem more_prems).varid in + let quants_filtered = Lib.List.filter_not (fun q -> match q.it with + | ExpP (id, _) -> Free.Set.mem id.it free_vars + | _ -> true + ) quants in + let quant_prems = (List.filter_map get_exp_typ quants_filtered) |> List.concat_map (get_wf_pred env) in + quant_prems @ more_prems + +let t_rule env rule = + let tf = { base_transformer with transform_exp = t_exp env; transform_typ = t_typ} in + (match rule.it with + | RuleD (id, quants, m, exp, prems) -> + let extra_prems = get_extra_prems env quants exp prems in + RuleD (id, + List.map (transform_param tf) quants, + m, + transform_exp tf exp, + List.map (transform_prem tf) (prems @ extra_prems) + ) + ) $ rule.at + +let t_clause env clause = + let tf = { base_transformer with transform_exp = t_exp env; transform_typ = t_typ} in + (match clause.it with + | DefD (quants, args, exp, prems) -> + let free_args = Free.free_list Free.free_arg args in + (* Only focus on generating wf preds for variables not in the arguments *) + let filtered_quants = Lib.List.filter_not (is_part_of_quant free_args) quants in + let extra_prems = get_extra_prems env filtered_quants exp prems in + DefD (List.map (transform_param tf) quants, + List.map (transform_arg tf) args, + transform_exp tf exp, + List.map (transform_prem tf) (prems @ extra_prems) + ) + ) $ clause.at + +let is_not_exp_param param = + match param.it with + | ExpP _ -> false + | _ -> true + +let get_def_id def = + match def.it with + | TypD (id, _, _) -> id + | _ -> "" $ def.at + +let remove_unused_params def = + match def.it with + | DecD (id, params, typ, clauses) -> + let params' = [Lib.List.last params] in + let clauses' = List.map (fun clause -> match clause.it with + | DefD (quants, args, exp, prems) -> + let a = Lib.List.last args in + let free_vars = Free.free_arg a in + let filtered_quants = List.filter (is_part_of_quant free_vars) quants in + DefD (filtered_quants, [a], exp, prems) $ clause.at + ) clauses in + { def with it = DecD (id, params', typ, clauses') } + | _ -> def + +let rec t_def env def = + let tf = { base_transformer with transform_exp = t_exp env; transform_typ = t_typ } in + match def.it with + | TypD (id, params, [inst]) when List.exists is_not_exp_param params -> + (TypD (id, List.map (transform_param tf) params |> List.filter is_type_param, [inst]) $ def.at, []) + | TypD (id, params, [inst]) -> + let relation = create_well_formed_predicate env id inst in + (TypD (id, List.map (transform_param tf) params |> List.filter is_type_param, [t_inst env inst]) $ def.at, relation) + | TypD (_, _, _) -> + error def.at "Multiples instances encountered, please run type family removal pass first." + | RelD (id, params, m, typ, rules) -> + (RelD (id, List.map (transform_param tf) params |> List.filter is_type_param, m, transform_typ tf typ, List.map (t_rule env) rules) $ def.at, []) + | DecD (id, params, typ, clauses) -> + let d = DecD (id, + List.map (transform_param tf) params, + transform_typ tf typ, + List.map (t_clause env) clauses + ) $ def.at + in + let t_d = if StringSet.mem id.it env.proj_set then remove_unused_params d else d in + (t_d, []) + | GramD (id, params, typ, prods) -> + (GramD (id, List.map (transform_param tf) params, transform_typ tf typ, List.map (transform_prod tf) prods) $ def.at, []) + | RecD defs -> + if List.exists (needs_wfness env) defs + then List.iter (fun d -> bind_wf_set env (get_def_id d).it) defs; + let defs', wf_relations = List.map (t_def env) defs |> List.split in + let rec_defs = RecD defs' $ def.at in + if List.concat wf_relations = [] then (rec_defs, []) else + (rec_defs, [RecD (List.concat wf_relations) $ def.at]) + | HintD hintdef -> (HintD hintdef $ def.at, []) + +let has_proj_hint (hint : hint) = hint.hintid.it = Typefamilyremoval.projection_hint_id + +let create_proj_map_def set (d : def) = + match d.it with + | HintD {it = DecH (id, hints); _} -> + (match (List.find_opt has_proj_hint hints) with + | Some _ -> set := StringSet.add id.it !set + | _ -> () + ) + | _ -> () + +let transform (il : script): script = + let env = empty () in + env.il_env <- Il.Env.env_of_script il; + let proj_set = ref StringSet.empty in + List.iter (create_proj_map_def proj_set) il; + env.proj_set <- !proj_set; + List.concat_map (fun d -> + let (t_d, wf_relations) = t_def env d in + t_d :: wf_relations + ) il \ No newline at end of file diff --git a/spectec/src/middlend/undep.mli b/spectec/src/middlend/undep.mli new file mode 100644 index 0000000000..b19733d32c --- /dev/null +++ b/spectec/src/middlend/undep.mli @@ -0,0 +1,44 @@ +(* +This transformation separates indexed types into simple types and their corresponding +wellformedness predicate. + +This is achieved through the following steps: + * Create the wellformedness predicate as a relation that takes in the corresponding + type, and its dependent type parameters. + * For variants, it creates a wellformedness case for each variant case. it supplies + the premises that the indexed type used to have. + * For structs/records, it creates a singular case where all premises of all fields + are checked. + * For definitions and relations, we collect terms that should have a wellformedness check + and add it to the current premise list. This results in wellformedness predicates being + "bubbled up." + * Then finally, we traverse through the IL, removing any notion of indexed types. + +As an example, +given the following variant indexed type: + +syntax foo(v : t) = + | CASE{v2 : t}(v2 : t) + -- if v = v2 + +where t is an arbitrary type, and v and v2 are terms of type t. + +Assume that type t needs a wellformedness check. + +This is transformed into: + +syntax foo = + | CASE{v2 : t}(v2 : t) + +relation wf_foo: `%%`(t, foo) + rule foo_case_0{v : t, v2 : t}: + `%%`(v, CASE_foo(v2)) + -- wf_t: `%`(v) + -- if (v = v2) + +This pass requires the typefamilyremoval pass to be ran first, as it ensures that type families are +transformed correctly. +*) + +val wf_hint_id : string +val transform : Il.Ast.script -> Il.Ast.script \ No newline at end of file diff --git a/spectec/src/middlend/unthe.ml b/spectec/src/middlend/unthe.ml index 82e395cdd7..046e221137 100644 --- a/spectec/src/middlend/unthe.ml +++ b/spectec/src/middlend/unthe.ml @@ -1,14 +1,3 @@ -(* -This transformation removes use of the ! operator from relations, by -introducing fresh variables. - -An occurrence of !(e) will be replaced with a fresh variable x of the suitable -type (and dimension), and a new condition e = ?(x) is added. - -This is an alternative to to how the Sideconditions pass handles the ! operator. -If you need both, passes, run this one first. -*) - open Util open Source open Il.Ast @@ -159,6 +148,7 @@ and t_exp' n e : eqns * exp' = let eqns2, iterexp'' = t_iterexp n iterexp' in let iterexp''' = update_iterexp_vars (Il.Free.free_exp e') iterexp'' in eqns1' @ eqns2, IterE (e', iterexp''') + | IfE (e1, e2, e3) -> t_eee n (e1, e2, e3) (fun (e1', e2', e3') -> IfE (e1', e2', e3')) and t_field n ((a, e) : expfield) = unary t_exp n e (fun e' -> (a, e')) @@ -206,6 +196,9 @@ and t_prem' n prem : eqns * prem' = let eqns2, iterexp'' = t_iterexp n iterexp' in let iterexp''' = update_iterexp_vars (Il.Free.free_prem prem') iterexp'' in eqns1' @ eqns2, IterPr (prem', iterexp''') + | NegPr prem -> + let eqns1, prem' = t_prem n prem in + eqns1, NegPr (prem') let t_prems n k = t_list t_prem n k (fun x -> x) diff --git a/spectec/src/middlend/unthe.mli b/spectec/src/middlend/unthe.mli index 542bbf8052..0084b7b929 100644 --- a/spectec/src/middlend/unthe.mli +++ b/spectec/src/middlend/unthe.mli @@ -1 +1,12 @@ +(* +This transformation removes use of the ! operator from relations, by +introducing fresh variables. + +An occurrence of !(e) will be replaced with a fresh variable x of the suitable +type (and dimension), and a new condition e = ?(x) is added. + +This is an alternative to to how the Sideconditions pass handles the ! operator. +If you need both, passes, run this one first. +*) + val transform : Il.Ast.script -> Il.Ast.script diff --git a/spectec/src/middlend/utils.ml b/spectec/src/middlend/utils.ml new file mode 100644 index 0000000000..b7f56b4e68 --- /dev/null +++ b/spectec/src/middlend/utils.ml @@ -0,0 +1,85 @@ +open Il.Ast +open Il +open Util.Source + +(* HACK This is used to distinguish between normal types and type families *) +let check_normal_type_creation (inst : inst) : bool = + match inst.it with + | InstD (_, args, _) -> List.for_all (fun arg -> + match arg.it with + (* Args in normal types can really only be variable expressions or type params *) + | ExpA {it = VarE _; _} | TypA _ -> true + | _ -> false + ) args + +let rec reduce_type_aliasing env t = + match t.it with + | VarT(id, args) -> + (match Env.find_opt_typ env id with + | Some (_, [inst]) when check_normal_type_creation inst -> reduce_inst_alias env args inst t + | _ -> t + ) + | _ -> t + +and reduce_inst_alias env args inst base_typ = + match inst.it with + | InstD (_, args', {it = AliasT typ; _}) -> + (match Eval.match_list Eval.match_arg env Subst.empty args args' with + | Ok (Some subst) -> reduce_type_aliasing env (Subst.subst_typ subst typ) + | Ok None | Error _ -> reduce_type_aliasing env typ + ) + | _ -> base_typ + +let generate_var ids id = + let start = 0 in + let fresh_prefix = "var" in + let max = 1000 in + let rec go prefix c = + if max <= c then assert false else + let name = prefix ^ "_" ^ Int.to_string c in + if (List.mem name ids) + then go prefix (c + 1) + else name + in + match id with + | "" | "_" -> go fresh_prefix start + | s when List.mem s ids -> go s start + | _ -> id + +let improve_ids_quants ids generate_all_quants at exp_typ_pairs = + let rec improve_ids_helper ids qs = + match qs with + | [] -> ([], []) + | (q_id, t) :: qs' -> + let new_name = generate_var ids q_id.it in + let (quants, pairs) = improve_ids_helper (new_name :: ids) qs' in + let new_pairs = (new_name $ q_id.at, t) :: pairs in + if not generate_all_quants && new_name = q_id.it + then (quants, new_pairs) + else ((ExpP (new_name $ q_id.at, t) $ at) :: quants, new_pairs) + in + improve_ids_helper ids exp_typ_pairs + +let get_param_id p = + match p.it with + | ExpP (id, _) | TypP id | DefP (id, _, _) | GramP (id, _, _) -> id + +let improve_ids_params params = + let reconstruct_param id p = + (match p.it with + | ExpP (_, t) -> ExpP (id, t) + | TypP _ -> TypP id + | DefP (_, params, r_typ) -> DefP (id, params, r_typ) + | GramP (_, params, r_typ) -> GramP (id, params, r_typ) + ) $ p.at + in + let rec improve_ids_helper ids ps = + match ps with + | [] -> [] + | p :: ps' -> + let p_id = get_param_id p in + let new_name = generate_var ids p_id.it $ p_id.at in + reconstruct_param new_name p :: improve_ids_helper (new_name.it :: ids) ps' + in + improve_ids_helper [] params + diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 854415f06e..25912fd720 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -1160,9 +1160,7 @@ syntax reftype = | REF(`null?` : null?, heaptype : heaptype) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec -syntax Inn = - | I32 - | I64 +syntax Inn = addrtype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec syntax Fnn = @@ -1170,8 +1168,7 @@ syntax Fnn = | F64 ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec -syntax Vnn = - | V128 +syntax Vnn = vectype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec syntax Cnn = @@ -1266,13 +1263,7 @@ syntax Jnn = | I16 ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec -syntax Lnn = - | I32 - | I64 - | F32 - | F64 - | I8 - | I16 +syntax Lnn = lanetype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec syntax limits = @@ -1379,7 +1370,7 @@ def $zsize(storagetype : storagetype) : nat ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $isize(Inn : Inn) : nat ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec - def $isize{Inn : Inn}(Inn) = $size((Inn : Inn <: numtype)) + def $isize{Inn : Inn}(Inn) = $size((Inn : addrtype <: numtype)) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $jsize(Jnn : Jnn) : nat @@ -1405,7 +1396,7 @@ def $inv_jsize(nat : nat) : Jnn ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $inv_jsize(16) = I16_Jnn ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec - def $inv_jsize{n : n}(n) = ($inv_isize(n) : Inn <: Jnn) + def $inv_jsize{n : n}(n) = ($inv_isize(n) : addrtype <: Jnn) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $inv_fsize(nat : nat) : Fnn @@ -1593,7 +1584,7 @@ def $funcsxt(externtype*) : deftype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:337.1-337.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:337.1-337.126 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:365.1-365.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) @@ -1608,7 +1599,7 @@ def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.59 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.73 def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:402.1-402.39 def $minus_recs([], []) = ([], []) @@ -2003,7 +1994,7 @@ def $free_moduletype(moduletype : moduletype) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax num_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax num_{Inn : Inn}((Inn : Inn <: numtype)) = iN($sizenn((Inn : Inn <: numtype))) + syntax num_{Inn : Inn}((Inn : addrtype <: numtype)) = iN($sizenn((Inn : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -2057,12 +2048,12 @@ syntax sx = ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax unop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax unop_{Inn : Inn}((Inn : Inn <: numtype)) = + syntax unop_{Inn : Inn}((Inn : addrtype <: numtype)) = | CLZ | CTZ | POPCNT | EXTEND(sz : sz,) - -- if (sz!`%`_sz.0 < $sizenn((Inn : Inn <: numtype))) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -2079,7 +2070,7 @@ syntax unop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax binop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax binop_{Inn : Inn}((Inn : Inn <: numtype)) = + syntax binop_{Inn : Inn}((Inn : addrtype <: numtype)) = | ADD | SUB | MUL @@ -2106,13 +2097,13 @@ syntax binop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec -syntax testop_{Inn : Inn}((Inn : Inn <: numtype)) = +syntax testop_{Inn : Inn}((Inn : addrtype <: numtype)) = | EQZ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax relop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax relop_{Inn : Inn}((Inn : Inn <: numtype)) = + syntax relop_{Inn : Inn}((Inn : addrtype <: numtype)) = | EQ | NE | LT(sx) @@ -2134,26 +2125,26 @@ syntax relop_(numtype : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax cvtop__(numtype_1 : numtype, numtype_2 : numtype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax cvtop__{Inn_1 : Inn, Inn_2 : Inn}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype)) = + syntax cvtop__{Inn_1 : Inn, Inn_2 : Inn}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype)) = | EXTEND(sx) - -- if ($sizenn1((Inn_1 : Inn <: numtype)) < $sizenn2((Inn_2 : Inn <: numtype))) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) | WRAP - -- if ($sizenn1((Inn_1 : Inn <: numtype)) > $sizenn2((Inn_2 : Inn <: numtype))) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax cvtop__{Inn_1 : Inn, Fnn_2 : Fnn}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype)) = + syntax cvtop__{Inn_1 : Inn, Fnn_2 : Fnn}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype)) = | CONVERT(sx) | REINTERPRET - -- if ($sizenn1((Inn_1 : Inn <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax cvtop__{Fnn_1 : Fnn, Inn_2 : Inn}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype)) = + syntax cvtop__{Fnn_1 : Fnn, Inn_2 : Inn}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype)) = | TRUNC(sx) | TRUNC_SAT(sx) | REINTERPRET - -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : Inn <: numtype))) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -2399,14 +2390,14 @@ syntax memarg = } ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec -syntax loadop_{Inn : Inn}((Inn : Inn <: numtype)) = +syntax loadop_{Inn : Inn}((Inn : addrtype <: numtype)) = | `%_%`(sz : sz, sx : sx) - -- if (sz!`%`_sz.0 < $sizenn((Inn : Inn <: numtype))) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec -syntax storeop_{Inn : Inn}((Inn : Inn <: numtype)) = +syntax storeop_{Inn : Inn}((Inn : addrtype <: numtype)) = | `%`(sz : sz,) - -- if (sz!`%`_sz.0 < $sizenn((Inn : Inn <: numtype))) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax vloadop_{vectype : vectype}(vectype) = @@ -3119,7 +3110,7 @@ syntax context = ;; ../../../../specification/wasm-latest/2.0-validation.contexts.spectec rec { -;; ../../../../specification/wasm-latest/2.0-validation.contexts.spectec:49.1-49.144 +;; ../../../../specification/wasm-latest/2.0-validation.contexts.spectec:49.1-49.158 def $with_locals(context : context, localidx*, localtype*) : context ;; ../../../../specification/wasm-latest/2.0-validation.contexts.spectec:51.1-51.34 def $with_locals{C : context}(C, [], []) = C @@ -3828,11 +3819,11 @@ relation Catch_ok: `%|-%:OK`(context, catch) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec def $default_(valtype : valtype) : val? ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec - def $default_{Inn : Inn}((Inn : Inn <: valtype)) = ?(CONST_val((Inn : Inn <: numtype), `%`_num_(0,))) + def $default_{Inn : Inn}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), `%`_num_(0,))) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), $fzero($size((Fnn : Fnn <: numtype))))) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec - def $default_{Vnn : Vnn}((Vnn : Vnn <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + def $default_{Vnn : Vnn}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec @@ -4281,7 +4272,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:456.1-459.36 rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: - `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : Inn <: valtype)],))) + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, K) @@ -4293,7 +4284,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:475.1-478.36 rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: - `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)],), [], `%`_resulttype([],))) + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, K) @@ -4558,8 +4549,8 @@ relation Instr_const: `%|-%CONST`(context, instr) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(), t)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec - rule binop{C : context, Inn : Inn, binop : binop_((Inn : Inn <: numtype))}: - `%|-%CONST`(C, BINOP_instr((Inn : Inn <: numtype), binop)) + rule binop{C : context, Inn : Inn, binop : binop_((Inn : addrtype <: numtype))}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) -- if (Inn <- [I32_Inn I64_Inn]) -- if (binop <- [ADD_binop_ SUB_binop_ MUL_binop_]) @@ -5327,13 +5318,13 @@ def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($c ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $unop_{Inn : Inn, i : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CLZ_unop_, i) = [$iclz_($sizenn((Inn : Inn <: numtype)), i)] + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CLZ_unop_, i) = [$iclz_($sizenn((Inn : addrtype <: numtype)), i)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $unop_{Inn : Inn, i : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), CTZ_unop_, i) = [$ictz_($sizenn((Inn : Inn <: numtype)), i)] + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CTZ_unop_, i) = [$ictz_($sizenn((Inn : addrtype <: numtype)), i)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $unop_{Inn : Inn, i : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), POPCNT_unop_, i) = [$ipopcnt_($sizenn((Inn : Inn <: numtype)), i)] + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), POPCNT_unop_, i) = [$ipopcnt_($sizenn((Inn : addrtype <: numtype)), i)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $unop_{Inn : Inn, N' : N, i : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EXTEND_unop_(`%`_sz(N',),), i) = [$iextend_($sizenn((Inn : Inn <: numtype)), N', S_sx, i)] + def $unop_{Inn : Inn, N' : N, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EXTEND_unop_(`%`_sz(N',),), i) = [$iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, f) = $fabs_($sizenn((Fnn : Fnn <: numtype)), f) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec @@ -5352,29 +5343,29 @@ def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : nu ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ADD_binop_, i_1, i_2) = [$iadd_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ADD_binop_, i_1, i_2) = [$iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SUB_binop_, i_1, i_2) = [$isub_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SUB_binop_, i_1, i_2) = [$isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), MUL_binop_, i_1, i_2) = [$imul_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), MUL_binop_, i_1, i_2) = [$imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), DIV_binop_(sx), i_1, i_2) = lift($idiv_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2)) + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), DIV_binop_(sx), i_1, i_2) = lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), REM_binop_(sx), i_1, i_2) = lift($irem_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2)) + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), REM_binop_(sx), i_1, i_2) = lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), AND_binop_, i_1, i_2) = [$iand_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), AND_binop_, i_1, i_2) = [$iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), OR_binop_, i_1, i_2) = [$ior_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), OR_binop_, i_1, i_2) = [$ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), XOR_binop_, i_1, i_2) = [$ixor_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), XOR_binop_, i_1, i_2) = [$ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHL_binop_, i_1, i_2) = [$ishl_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHL_binop_, i_1, i_2) = [$ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), SHR_binop_(sx), i_1, i_2) = [$ishr_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2)] + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHR_binop_(sx), i_1, i_2) = [$ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTL_binop_, i_1, i_2) = [$irotl_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTL_binop_, i_1, i_2) = [$irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $binop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), ROTR_binop_, i_1, i_2) = [$irotr_($sizenn((Inn : Inn <: numtype)), i_1, i_2)] + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTR_binop_, i_1, i_2) = [$irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, f_1, f_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec @@ -5393,22 +5384,22 @@ def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), n ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $testop_{Inn : Inn, i : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQZ_testop_, i) = $ieqz_($sizenn((Inn : Inn <: numtype)), i) + def $testop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQZ_testop_, i) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), EQ_relop_, i_1, i_2) = $ieq_($sizenn((Inn : Inn <: numtype)), i_1, i_2) + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQ_relop_, i_1, i_2) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), NE_relop_, i_1, i_2) = $ine_($sizenn((Inn : Inn <: numtype)), i_1, i_2) + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), NE_relop_, i_1, i_2) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LT_relop_(sx), i_1, i_2) = $ilt_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2) + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LT_relop_(sx), i_1, i_2) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GT_relop_(sx), i_1, i_2) = $igt_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2) + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GT_relop_(sx), i_1, i_2) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), LE_relop_(sx), i_1, i_2) = $ile_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2) + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LE_relop_(sx), i_1, i_2) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : Inn <: numtype)), i_2 : num_((Inn : Inn <: numtype))}((Inn : Inn <: numtype), GE_relop_(sx), i_1, i_2) = $ige_($sizenn((Inn : Inn <: numtype)), sx, i_1, i_2) + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GE_relop_(sx), i_1, i_2) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, f_1, f_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec @@ -5425,25 +5416,25 @@ def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), n ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, i_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), EXTEND_cvtop__(sx), i_1) = [$extend__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, i_1)] + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), EXTEND_cvtop__(sx), i_1) = [$extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, i_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Inn_2 : Inn <: numtype), WRAP_cvtop__, i_1) = [$wrap__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), i_1)] + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), WRAP_cvtop__, i_1) = [$wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_cvtop__(sx), f_1) = lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, f_1)) + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_cvtop__(sx), f_1) = lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), TRUNC_SAT_cvtop__(sx), f_1) = lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : Inn <: numtype)), sx, f_1)) + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_SAT_cvtop__(sx), f_1) = lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, i_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), i_1) = [$convert__($sizenn1((Inn_1 : Inn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1)] + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), i_1) = [$convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1)] ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, f_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, f_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, i_1 : num_((Inn_1 : Inn <: numtype))}((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, i_1) = [$reinterpret__((Inn_1 : Inn <: numtype), (Fnn_2 : Fnn <: numtype), i_1)] - -- if ($size((Inn_1 : Inn <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, i_1) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), i_1)] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), REINTERPRET_cvtop__, f_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : Inn <: numtype), f_1)] - -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : Inn <: numtype))) + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), REINTERPRET_cvtop__, f_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), f_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* @@ -5592,7 +5583,7 @@ def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec - def $fvrelop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), Inn : Inn, `c*` : iN($sizenn((Fnn : Fnn <: numtype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : Inn <: lanetype), M), `%`_lane_(c!`%`_iN.0,)*{c <- `c*`}) + def $fvrelop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), Inn : Inn, `c*` : iN($sizenn((Fnn : Fnn <: numtype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), `%`_lane_(c!`%`_iN.0,)*{c <- `c*`}) -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) -- if (c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) @@ -5767,11 +5758,11 @@ def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, sha def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1))), c : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx), c_1) = [c] -- if (c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1)) ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec - def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : Inn <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) - -- if (c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, c_1)) + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec - def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : Inn <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) - -- if (c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : Inn <: lanetype)), sx, c_1)) + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(ZERO_zero), c_1) = c*{c <- `c*`} -- if (c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1)) @@ -7074,12 +7065,12 @@ relation Step_read: `%~>%`(config, instr*) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule `load-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: - `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [TRAP_instr]) + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [TRAP_instr]) -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule `load-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN(n)}: - `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [CONST_instr((Inn : Inn <: numtype), $extend__(n, $size((Inn : Inn <: numtype)), sx, c))]) + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))]) -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -7518,14 +7509,14 @@ relation Step: `%~>%`(config, config) -- if (b*{b <- `b*`} = $nbytes_(nt, c)) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec:523.1-526.52 - rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : Inn <: numtype)), n : n, x : idx, ao : memarg}: - `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : Inn <: numtype), c) STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config(z, [TRAP_instr])) + rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config(z, [TRAP_instr])) -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec:528.1-532.52 - rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : Inn <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: - `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : Inn <: numtype), c) STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) - -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : Inn <: numtype)), n, c))) + rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, c))) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec:534.1-537.63 rule `vstore-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg}: diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index 2ec89f500a..de4ec30702 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md @@ -2879,9 +2879,9 @@ $$ $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {\mathsf{i}}{N} & ::= & \mathsf{i{\scriptstyle 32}} ~~|~~ \mathsf{i{\scriptstyle 64}} \\ +& {\mathsf{i}}{N} & ::= & {\mathit{addrtype}} \\ & {\mathsf{f}}{N} & ::= & \mathsf{f{\scriptstyle 32}} ~~|~~ \mathsf{f{\scriptstyle 64}} \\ -& {\mathsf{v}}{N} & ::= & \mathsf{v{\scriptstyle 128}} \\ +& {\mathsf{v}}{N} & ::= & {\mathit{vectype}} \\ & t & ::= & {\mathsf{i}}{N} ~~|~~ {\mathsf{f}}{N} ~~|~~ {\mathsf{v}}{N} \\ \end{array} $$ @@ -2976,7 +2976,7 @@ $$ \begin{array}[t]{@{}lrrl@{}l@{}} & {\mathsf{i}}{N} & ::= & {\mathit{packtype}} \\ & {\mathsf{i}}{N} & ::= & {\mathsf{i}}{N} ~~|~~ {\mathsf{i}}{N} \\ -& {\mathsf{i}}{N} & ::= & {\mathsf{i}}{N} ~~|~~ {\mathsf{f}}{N} ~~|~~ {\mathsf{i}}{N} \\ +& {\mathsf{i}}{N} & ::= & {\mathit{lanetype}} \\ \end{array} $$ diff --git a/spectec/test-middlend/Makefile b/spectec/test-middlend/Makefile index 4a338ef530..886540069e 100644 --- a/spectec/test-middlend/Makefile +++ b/spectec/test-middlend/Makefile @@ -22,12 +22,11 @@ all: test # Test -.PHONY: test $(TESTS) +.PHONY: test -test: $(TESTS) +test: + dune runtest -$(TESTS): test-%: $(SPECCLONE) $(EXE) - (cd $(SPECCLONE)/$* && $(EXE) -l *.$(EXT)) # Executable diff --git a/spectec/test-middlend/TEST.md b/spectec/test-middlend/TEST.md index 1e1588abc4..38d04d7d8e 100644 --- a/spectec/test-middlend/TEST.md +++ b/spectec/test-middlend/TEST.md @@ -4318,7 +4318,7 @@ relation Module_ok: `|-%:%`(module, moduletype) -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) - -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, start?{start <- `start?`}, export*{export <- `export*`}))) -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) @@ -16213,7 +16213,7 @@ relation Module_ok: `|-%:%`(module, moduletype) -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) - -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, start?{start <- `start?`}, export*{export <- `export*`}))) -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) @@ -28237,7 +28237,7 @@ relation Module_ok: `|-%:%`(module, moduletype) -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) - -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, start?{start <- `start?`}, export*{export <- `export*`}))) -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) diff --git a/spectec/test-middlend/dune b/spectec/test-middlend/dune index bdcd6e7403..e46788d1c6 100644 --- a/spectec/test-middlend/dune +++ b/spectec/test-middlend/dune @@ -1,9 +1,55 @@ -(mdx - (libraries spectec) +; A simple test of processing `test.spectec` in this directory. +; Output from all passes is dumped compared to `test.spectec.exp` +; Run `dune promote` to update expected output. + +(rule + (action (with-stdout-to test.spectec.act + (run ../src/exe-spectec/main.exe test.spectec -l --print-all-il --print-no-pos --all-passes --check) + )) (deps (file ../src/exe-spectec/main.exe) - (glob_files_rec ../_specification/*) (glob_files *.spectec) ) - (files TEST.md) +) +(rule (alias runtest) (action (diff test.spectec.exp test.spectec.act))) + +; A more complicated setup that tests the various middle end passes against the full specification. +; +; It stores each pass's output in a separate directory. +; +; This requires a dynamic dune rule to enumerate the files. When this changes, then running +; +; rm specification.exp/* +; dune runtest test-middlend --auto-promote --diff-command "diff -Nur" +; +; should update that dynamically included dune file. + +(rule + (targets + specification.act + ) + (action + (system "mkdir -p specification.act; ../src/exe-spectec/main.exe ../../../../specification/wasm-3.0/*.spectec -l --print-all-il-to specification.act/%s.il --print-no-pos --all-passes --check") + ) + (deps + (file ../src/exe-spectec/main.exe) + (glob_files_rec ../_specification/*) + ) +) + +(include dune.inc) + +(rule (alias dune.inc) (action (diff dune.inc dune.inc.gen))) +(alias (name runtest) (deps (alias dune.inc))) + +; The generated rules depend on dune.inc. This way, these actions are not run when dune.inc is out +; of date. +(rule + (deps (file specification.act)) + (action (with-stdout-to dune.inc.gen (system + "ls specification.act | + while read f; do + echo \"(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/$f specification.act/$f))))\"; + done" + ))) ) diff --git a/spectec/test-middlend/dune.inc b/spectec/test-middlend/dune.inc new file mode 100644 index 0000000000..c0e1be3143 --- /dev/null +++ b/spectec/test-middlend/dune.inc @@ -0,0 +1,14 @@ +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/00-elab.il specification.act/00-elab.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/01-ite.il specification.act/01-ite.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/02-let-intro-mech.il specification.act/02-let-intro-mech.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/03-typefamily-removal.il specification.act/03-typefamily-removal.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/04-remove-indexed-types.il specification.act/04-remove-indexed-types.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/05-totalize.il specification.act/05-totalize.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/06-else.il specification.act/06-else.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/07-else-simplification.il specification.act/07-else-simplification.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/08-uncase-removal.il specification.act/08-uncase-removal.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/09-sideconditions.il specification.act/09-sideconditions.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/10-sub-expansion.il specification.act/10-sub-expansion.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/11-sub.il specification.act/11-sub.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/12-alias-demut.il specification.act/12-alias-demut.il)))) +(rule (alias runtest) (deps (alias dune.inc) (file specification.act) (glob_files_rec specification.exp/*)) (action (no-infer (diff specification.exp/13-improve-ids.il specification.act/13-improve-ids.il)))) diff --git a/spectec/test-middlend/specification.exp/00-elab.il b/spectec/test-middlend/specification.exp/00-elab.il new file mode 100644 index 0000000000..434db036d1 --- /dev/null +++ b/spectec/test-middlend/specification.exp/00-elab.il @@ -0,0 +1,11877 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = i + -- if (i <= j) + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = j + -- otherwise + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?() + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(w) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : n}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : n, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = [] + -- if (w = w_1) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:46.1-46.77 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = $setminus1_(syntax X, w, w'*{w' <- `w'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN{N : N}(N) = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN{N : N}(N) = + | `%`(i : int,) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN(8) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN(16) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN(31) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN(33) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = 23 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = 52 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = 8 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = 11 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : N}(N) = $signif(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : N}(N) = $expon(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag{N : N}(N) = + | NORM(m : m, exp : exp) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + | SUBNORM(m : m,) {exp : exp} + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + | INF + | NAN(m : m,) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN{N : N}(N) = + | POS(fNmag(N)) + | NEG(fNmag(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : N}(N) = POS_fN(SUBNORM_fNmag(0,)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : N, n : n}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : N}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : N}(N) = (2 ^ ((($signif(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b : byte}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- if (`%`_byte(ch!`%`_char.0,) = b) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : typeidx}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : funcidx}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : globalidx}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : tableidx}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : memidx}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : elemidx}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : dataidx}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : localidx}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : labelidx}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : tagidx}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : funcidx}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : globalidx}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : tableidx}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : memidx}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : tagidx}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = I32_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = $vsize(vectype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : Inn}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : n}(n) = ($inv_isize(n) : addrtype <: Jnn) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : n}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ($lunpack(lanetype) : numtype <: consttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = at_1 + -- if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = at_2 + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = dt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : tagtype, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 + -- if (tv = tv_1) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:367.1-367.92 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ([], []) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : tagtype, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : n, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : n}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : tagtype}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Inn : Inn}((Inn : addrtype <: numtype)) = iN($sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_{Pnn : Pnn}(Pnn) = iN($psizenn(Pnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_(lanetype : lanetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_(storagetype : storagetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{numtype : numtype}((numtype : numtype <: storagetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{vectype : vectype}((vectype : vectype <: storagetype)) = vec_(vectype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{packtype : packtype}((packtype : packtype <: storagetype)) = pack_(packtype) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__(numtype_1 : numtype, numtype_2 : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Inn_2 : Inn}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype)) = + | EXTEND(sx) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + | WRAP + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Fnn_2 : Fnn}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype)) = + | CONVERT(sx) + | REINTERPRET + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Inn_2 : Inn}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype)) = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype)) = + | PROMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + | DEMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) {Jnn : Jnn} + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ABS + | NEG + | POPCNT + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ADD + | SUB + | ADD_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | SUB_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | MUL + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + | AVGRU + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | Q15MULR_SATS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | RELAXED_Q15MULRS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | MIN(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + | MAX(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | RELAXED_LANESELECT + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | RELAXED_MADD + | RELAXED_NMADD + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | EQ + | NE + | LT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | LE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_{Jnn : Jnn, M : M}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_{M : M}(`%`_bshape(`%X%`_shape(I8_lanetype, M),)) = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTADD_PAIRWISE(sx) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTMUL(half : half, sx : sx) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + | DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | RELAXED_DOT_ADDS + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__(shape_1 : shape, shape_2 : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | EXTEND(half : half, sx : sx) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | CONVERT(`half?` : half?, sx : sx) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | DEMOTE(zero) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + | PROMOTELOW + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%_%`(sz : sz, sx : sx) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%`(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_{vectype : vectype}(vectype) = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + -- if (((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + | SPLAT(sz) + | ZERO(sz : sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_(numtype)?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_(numtype)?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_(vectype)?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_(numtype)) + | UNOP(numtype : numtype, unop_(numtype)) + | BINOP(numtype : numtype, binop_(numtype)) + | TESTOP(numtype : numtype, testop_(numtype)) + | RELOP(numtype : numtype, relop_(numtype)) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__(numtype_2, numtype_1)) + | VCONST(vectype : vectype, vec_(vectype)) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_(shape)) + | VBINOP(shape : shape, vbinop_(shape)) + | VTERNOP(shape : shape, vternop_(shape)) + | VTESTOP(shape : shape, vtestop_(shape)) + | VRELOP(shape : shape, vrelop_(shape)) + | VSHIFTOP(ishape : ishape, vshiftop_(ishape)) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_(bshape)) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__(ishape_2, ishape_1)) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__(ishape_2, ishape_1)) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__(shape_2, shape_1)) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_((consttype : consttype <: storagetype))) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : lit_(((numtype : numtype <: consttype) : consttype <: storagetype))}((numtype : numtype <: consttype), c) = CONST_instr(numtype, c) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : lit_(((vectype : vectype <: consttype) : consttype <: storagetype))}((vectype : vectype <: consttype), c) = VCONST_instr(vectype, c) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : typeidx}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : tagtype}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : expr}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : expr}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : typeidx, `local*` : local*, expr : expr}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : memidx, expr : expr}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : tableidx, expr : expr}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : funcidx}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = C + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : idx, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_idx.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype, `dt'*` : deftype*}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- if (dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`})) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype, `dt*` : deftype*}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype, `dt'*` : deftype*}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- if (dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : tagtype, `dt*` : deftype*}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype, `dt*` : deftype*}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype, `dt*` : deftype*}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : n, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : typeidx}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_typeidx.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : n}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(NULL_null?{}, heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_typeidx.0] = dt) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype), heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(NULL_null?{}, ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_idx.0] = lct))*{lct <- `lct*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], comptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_idx.0 < x_0!`%`_idx.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_idx.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_idx.0 + 1),))) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(MUT_mut?{}, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : Inn}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), `%`_num_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), $fzero($size((Fnn : Fnn <: numtype))))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : Vnn}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?() + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_labelidx.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(NULL_null?{}, ht)],)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + -- if (x <- C.REFS_context) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(?(MUT_mut), zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_idx.0] = rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_M.0)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_(V128_Vnn)}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) = ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_(vt)}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_((Inn : addrtype <: numtype))}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [ADD_binop_ SUB_binop_ MUL_binop_]) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_idx.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(MUT_mut?{}, t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_idx.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_idx.0] = jt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = gt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_idx.0] = mt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_idx.0] = tt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = [X_1 X_2][i!`%`_relaxed2.0] + -- if $ND + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = [X_1 X_2][0] + -- otherwise + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] + -- if $ND + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = [X_1 X_2 X_3 X_4][0] + -- otherwise + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_(numtype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_(vectype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_(storagetype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_((Cnn : Cnn <: storagetype)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = `%`_lane_(0,) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = $fzero($size((Fnn : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : N, i : int}(N, i) = 0 + -- if (i < (0 : nat <:> int)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : N, i : int}(N, i) = ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) + -- if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : N, i : int}(N, i) = (i : int <:> nat) + -- otherwise + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : N, i : int}(N, i) = - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) + -- if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : N, i : int}(N, i) = (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) + -- if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : N, i : int}(N, i) = i + -- otherwise + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : N, i_1 : iN(N)}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : N, i_1 : iN(N)}(N, i_1) = i_1 + -- if ($signed_(N, i_1!`%`_iN.0) >= (0 : nat <:> int)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : N, i_1 : iN(N)}(N, i_1) = $ineg_(N, i_1) + -- otherwise + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, U_sx, i) = `%`_iN((i!`%`_iN.0 \ (2 ^ K)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_iN.0 \ (2 ^ K)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 + i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_iN.0) : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 * i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_iN.0 : nat <:> int) - ((i_2!`%`_iN.0 * ($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N), j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_iN.0)) /\ (j_2 = $signed_(N, i_2!`%`_iN.0))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 <= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 > i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = i_1 + -- if ($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = i_2 + -- otherwise + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 >= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 < i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = i_1 + -- if ($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = i_2 + -- otherwise + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 + i_2!`%`_iN.0) : nat <:> int)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) + $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int))),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) - $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 = 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 =/= 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 < i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) < $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 > i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) > $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 <= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 >= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN(N)) : fN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : num_($lunpack((packtype : packtype <: lanetype)))}((packtype : packtype <: lanetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_(($cunpack((consttype : consttype <: storagetype)) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : lit_(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CLZ_unop_, i) = [$iclz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CTZ_unop_, i) = [$ictz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), POPCNT_unop_, i) = [$ipopcnt_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, N' : N, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EXTEND_unop_(`%`_sz(N',),), i) = [$iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, f) = $fabs_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, f) = $fneg_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, f) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, f) = $fceil_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, f) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, f) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, f) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), f) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ADD_binop_, i_1, i_2) = [$iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SUB_binop_, i_1, i_2) = [$isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), MUL_binop_, i_1, i_2) = [$imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), DIV_binop_(sx), i_1, i_2) = lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), REM_binop_(sx), i_1, i_2) = lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), AND_binop_, i_1, i_2) = [$iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), OR_binop_, i_1, i_2) = [$ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), XOR_binop_, i_1, i_2) = [$ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHL_binop_, i_1, i_2) = [$ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHR_binop_(sx), i_1, i_2) = [$ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTL_binop_, i_1, i_2) = [$irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTR_binop_, i_1, i_2) = [$irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, f_1, f_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, f_1, f_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, f_1, f_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, f_1, f_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, f_1, f_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, f_1, f_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, f_1, f_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQZ_testop_, i) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQ_relop_, i_1, i_2) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), NE_relop_, i_1, i_2) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LT_relop_(sx), i_1, i_2) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GT_relop_(sx), i_1, i_2) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LE_relop_(sx), i_1, i_2) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GE_relop_(sx), i_1, i_2) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, f_1, f_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, f_1, f_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, f_1, f_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, f_1, f_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, f_1, f_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, f_1, f_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), EXTEND_cvtop__(sx), i_1) = [$extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), WRAP_cvtop__, i_1) = [$wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_cvtop__(sx), f_1) = lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_SAT_cvtop__(sx), f_1) = lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), i_1) = [$convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, f_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, f_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, i_1) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), i_1)] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), REINTERPRET_cvtop__, f_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), f_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = c*{c <- `c*`}[i!`%`_iN.0] + -- if (i!`%`_iN.0 < |c*{c <- `c*`}|) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = `%`_iN(0,) + -- otherwise + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = c*{c <- `c*`}[i!`%`_iN.0] + -- if (i!`%`_iN.0 < |c*{c <- `c*`}|) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = `%`_iN(0,) + -- if ($signed_(N, i!`%`_iN.0) < (0 : nat <:> int)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = $relaxed2($R_swizzle, syntax iN(N), `%`_iN(0,), c*{c <- `c*`}[(i!`%`_iN.0 \ |c*{c <- `c*`}|)]) + -- otherwise + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c**` : lane_((Jnn : Jnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn), `c**` : lane_((Jnn : Jnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), Inn : Inn, `c*` : iN($sizenn((Fnn : Fnn <: numtype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), `%`_lane_(c!`%`_iN.0,)*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- if ($isize(Inn) = $fsize(Fnn)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), i : u32, `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), i : u32, `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), c : iN(32), `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, c_1, `%`_iN(0,))!`%`_u32.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_M.0 : nat <:> int)) : int <:> nat){}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : M, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1*{c_1 <- `c_1*`}, c_2)*{c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_laneidx.0]*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : Vnn, v : vec_(Vnn)}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn), v_3 : vec_(Vnn)}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ABS_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEG_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SQRT_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), CEIL_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), FLOOR_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), TRUNC_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEAREST_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ABS_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NEG_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), POPCNT_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MIN_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MAX_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), AVGRU_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), Q15MULR_SATS_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_Q15MULRS_vbinop_, v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), DIV_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_LANESELECT_vternop_, v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_NMADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), lane_ : lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1))), c : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx), c_1) = [c] + -- if (c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1))), c : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx), c_1) = [c] + -- if (c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(ZERO_zero), c_1) = c*{c <- `c*`} + -- if (c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__, c_1) = c*{c <- `c*`} + -- if (c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M : M, Lnn_2 : Lnn, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), half : half, `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_M.0) : M_2!`%`_M.0]) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_M.0{})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHL_vshiftop_, v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, sx : sx, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHR_vshiftop_(sx), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_(bshape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), RELAXED_SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `c'_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)) + -- if (c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`}) + -- if (c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_2)*{c_2 <- `c_2*`}) + -- if (v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c'_1*{c'_1 <- `c'_1*`} ++ c'_2*{c'_2 <- `c'_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : N, `i*` : iN(N)*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_iN.0*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn), `c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)) + -- if (c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`}) + -- if (c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTADD_PAIRWISE_vextunop__(sx), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx_1 : sx, sx_2 : sx, i : laneidx, k : laneidx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_laneidx.0 : k!`%`_laneidx.0]) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_laneidx.0 : k!`%`_laneidx.0]) + -- if (c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, c_1)*{c_1 <- `c_1*`}) + -- if (c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, c_2)*{c_2 <- `c_2*`}) + -- if (c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN(N)*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTMUL_vextbinop__(half, sx), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_M.0),), `%`_laneidx(M_2!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), N : N, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `ci'_1*` : iN(N)*, `ci'_2*` : iN(N)*, `ci*` : iN(N)*, `ci'*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, c' : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOT_ADDS_vextternop__, c_1, c_2, c_3) = c + -- if (N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype)))) + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if (ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`})) + -- if (ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`}) + -- if (c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`}))) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), ADD_vbinop_, c', c_3)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_(numtype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_(vectype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = (val : val <: fieldval) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : num_(I32_numtype)}((packtype : packtype <: storagetype), CONST_val(I32_numtype, i)) = PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : iN($psizenn(packtype))}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = CONST_val(I32_numtype, $extend__($psize(packtype), 32, sx, i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : addr, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : addr, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : addr, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : addr, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : addr, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : addr}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : addr}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : addr}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : addr}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : idx}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : idx}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : idx}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : idx}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : idx}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : idx}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : idx}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : idx}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : idx}(z, x) = $fof(z).LOCALS_frame[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_idx.0] = ?(v)]) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]].VALUE_globalinst = v], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : idx, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]].REFS_tableinst[i] = r], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : idx, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] = ti], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : idx, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : idx, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] = mi], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : idx, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : idx, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : n, r : ref, tableinst' : tableinst, at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*, i' : u64}(tableinst, n, r) = tableinst' + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}}) + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_u64.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if ((i'!`%`_u64.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : n, meminst' : meminst, at : addrtype, i : u64, `j?` : u64?, `b*` : byte*, i' : u64}(meminst, n) = meminst' + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}}) + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_u64.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if (i'!`%`_u64.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : addr}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_(nt)}: + `%|-%:%`(s, CONST_num(nt, c), nt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_(vt)}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN($psizenn(pt))}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_labelidx.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_labelidx.0 > 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[i!`%`_num_.0])]) + -- if (i!`%`_num_.0 < |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (i!`%`_num_.0 >= |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_(I32_numtype)}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref_1 = ref_2) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, $extend__(31, 32, sx, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_(nt), unop : unop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_(nt), unop : unop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_(nt), testop : testop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $testop_(nt, testop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), relop : relop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $relop_(nt, relop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2), c : num_(nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_(V128_Vnn), vvunop : vvunop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), vvbinop : vvbinop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), vvternop : vvternop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_(V128_Vnn), c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $inez_($vsize(V128_vectype), c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_(V128_Vnn), Jnn : Jnn, M : M, c : num_(I32_numtype), `i*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (c!`%`_num_.0 = $prod($inez_($jsizenn(Jnn), i)!`%`_u32.0*{i <- `i*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_(V128_Vnn), i : num_(I32_numtype), sh : ishape, vshiftop : vshiftop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, i)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_(V128_Vnn), sh : ishape, c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (c = $vbitmaskop_(sh, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, swizzlop : vswizzlop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, `i*` : laneidx*, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_(V128_Vnn), nt : numtype, M : M, i : laneidx, c_2 : num_(nt)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (c_2 = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_(V128_Vnn), pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (c_2 = $extend__($psize(pt), 32, sx, $lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_(V128_Vnn), Lnn : Lnn, c_2 : num_($lunpack(Lnn)), M : M, i : laneidx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_laneidx.0] = $lpacknum_(Lnn, c_2)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_(V128_Vnn), sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[i!`%`_num_.0] : ref <: instr)]) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((i_2!`%`_num_.0 + n) > |$table(z, x_2).REFS_tableinst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[j!`%`_num_.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg, c : num_(nt)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN(n)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg, c : vec_(V128_Vnn)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((K * M!`%`_M.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_(V128_Vnn), `j*` : iN(K)*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), `%`_lane_(j!`%`_iN.0,)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, c : vec_(V128_Vnn), k : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_laneidx.0] = `%`_lane_(k!`%`_iN.0,)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((i_2!`%`_num_.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((j!`%`_num_.0 + n) > |$data(z, y).BYTES_datainst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, `%`_num_($data(z, y).BYTES_datainst[j!`%`_num_.0]!`%`_byte.0,)) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0])]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ($default_($unpack(zt)) = ?(val)))*{val <- `val*`, zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [($unpackfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_fieldidx.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[i!`%`_num_.0 : n]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((i!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_(zt)*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), $const($cunpack(zt), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[i!`%`_num_.0 : ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[i!`%`_num_.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, `%`_num_(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_(I32_numtype), ref : ref, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_(I32_numtype), i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_1!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_2!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_((i_1!`%`_num_.0 + 1),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((i_1!`%`_num_.0 <= i_2!`%`_num_.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[j!`%`_num_.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((j!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, c : lit_(zt), `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const($cunpack(zt), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[j!`%`_num_.0 : ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`($as_deftype($tag(z, x).TYPE_taginst), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0], FIELDS val^n{val <- `val*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, i!`%`_num_.0, ref), [])) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), `%`_num_(|$table(z, x).REFS_tableinst|,))])) + -- if (ti = $growtable($table(z, x), n, ref)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, c))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_laneidx.0]!`%`_lane_.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), `%`_num_((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),))])) + -- if (mi = $growmem($mem(z, x), n)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_fieldidx.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], val)), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, i!`%`_num_.0, $packfield_(zt, val)), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype'*` : deftype*, `deftype*` : deftype*, rectype : rectype, x : idx}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- if (deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`})) + -- if (type = TYPE_type(rectype)) + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_idx.0 = |deftype'*{deftype' <- `deftype'*`}|) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : tagtype, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : tagtype, `tagtype'*` : tagtype*, s_2 : store, ja : tagaddr, `ja'*` : tagaddr*, s_1 : store}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- if ((s_1, ja) = $alloctag(s, tagtype)) + -- if ((s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*, s_2 : store, ga : globaladdr, `ga'*` : globaladdr*, s_1 : store}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- if ((s_1, ga) = $allocglobal(s, globaltype, val)) + -- if ((s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : u64, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_u64.0 * (64 * $Ki)){}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*, s_2 : store, ma : memaddr, `ma'*` : memaddr*, s_1 : store}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- if ((s_1, ma) = $allocmem(s, memtype)) + -- if ((s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : u64, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_u64.0{}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*, s_2 : store, ta : tableaddr, `ta'*` : tableaddr*, s_1 : store}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- if ((s_1, ta) = $alloctable(s, tabletype, ref)) + -- if ((s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*, s_2 : store, fa : funcaddr, `fa'*` : funcaddr*, s_1 : store}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- if ((s_1, fa) = $allocfunc(s, dt, funccode, moduleinst)) + -- if ((s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**, s_2 : store, da : dataaddr, `da'*` : dataaddr*, s_1 : store}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- if ((s_1, da) = $allocdata(s, ok, b*{b <- `b*`})) + -- if ((s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : elemtype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**, s_2 : store, ea : elemaddr, `ea'*` : elemaddr*, s_1 : store}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- if ((s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`})) + -- if ((s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_idx.0])} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `aa_I*` : tagaddr*, `ga_I*` : globaladdr*, `ma_I*` : memaddr*, `ta_I*` : tableaddr*, `fa_I*` : funcaddr*, `dt*` : deftype*, `fa*` : nat*, s_1 : store, `aa*` : tagaddr*, s_2 : store, `ga*` : globaladdr*, s_3 : store, `ma*` : memaddr*, s_4 : store, `ta*` : tableaddr*, s_5 : store, `da*` : dataaddr*, s_6 : store, `ea*` : elemaddr*, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- if (module = MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- if (aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`})) + -- if (fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`})) + -- if (fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}) + -- if ((s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`})) + -- if ((s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`})) + -- if ((s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`})) + -- if ((s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`})) + -- if ((s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`})) + -- if ((s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`})) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_idx.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*, y : idx, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*, y : idx, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : expr, `expr'*` : expr*, z'' : state, ref : ref, `ref'*` : ref*, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- if ((z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**, z'' : state, `ref*` : ref*, `ref'**` : ref**, z' : state}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- if ((z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`})) + -- if ((z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : expr, `expr'*` : expr*, z'' : state, val : val, `val'*` : val*, z' : state, s : store, f : frame, s' : store, a : addr}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- if (z' = `%;%`_state(s, f)) + -- if ((s', a) = $allocglobal(s, gt, val)) + -- if ((z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, s'''' : store, moduleinst : moduleinst, `instr_E*` : instr*, `instr_D*` : instr*, `instr_S?` : instr?, `xt_I*` : externtype*, `xt_E*` : externtype*, `type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, z' : state, `val_G*` : val*, z'' : state, `ref_T*` : ref*, z''' : state, `ref_E**` : ref**, s''' : store, f : frame, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- if (module = MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- if ((z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`})) + -- if ((z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`})) + -- if ((z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`})) + -- if (z''' = `%;%`_state(s''', f)) + -- if ((s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`})) + -- if (instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){})) + -- if (instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){})) + -- if (instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : funcaddr, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag(N) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : I, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) + -- otherwise +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_idx.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, $with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, ADD_binop_)], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(mut), t)) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_(F64_numtype), q_4 : num_(F64_numtype), q_3 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, ADD_binop_) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_(F64_numtype), q_5 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*, s_2 : store, a : addr, `a'*` : addr*, s_1 : store}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- if ((s_1, a) = $allocX(syntax X, syntax Y, s, X, Y)) + -- if ((s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`})) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat)), n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN(N)} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(32)} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(64)} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN(33)} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(32)} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(64)} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(32)} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(64)} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_s33.0 : int <:> nat),)) + -- if (i!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_labelidx.0,):Bbyte => `%`_laneidx(l!`%`_labelidx.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_labelidx.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(NULL_null?{}, ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => $opt_(syntax start, startopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => $opt_(syntax u32, nopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:({Tidchar} | {Tstring} | {","} | {";"} | {"["} | {"]"} | {"{"} | {"}"})+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} (Tnewline | Teof)} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:({" "} | Tformat | Tcomment | Tannot)*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {(Tspace | Ttoken)*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN(N)} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} ({"E"} | {"e"}) {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} ({"P"} | {"p"}) {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ $signif(N)))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(8)} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(32)} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(64)} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(8)} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(16)} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(32)} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(64)} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(32)} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(64)} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_idx.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_idx.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_idx.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_idx.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod (Bvar(syntax symdots) | Bvar(syntax B)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod (Tvar(syntax symdots) | Tvar(syntax T)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/01-ite.il b/spectec/test-middlend/specification.exp/01-ite.il new file mode 100644 index 0000000000..d4becdf46f --- /dev/null +++ b/spectec/test-middlend/specification.exp/01-ite.il @@ -0,0 +1,11788 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?() + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(w) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : n}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : n, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN{N : N}(N) = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN{N : N}(N) = + | `%`(i : int,) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN(8) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN(16) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN(31) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN(33) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = 23 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = 52 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = 8 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = 11 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : N}(N) = $signif(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : N}(N) = $expon(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag{N : N}(N) = + | NORM(m : m, exp : exp) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + | SUBNORM(m : m,) {exp : exp} + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + | INF + | NAN(m : m,) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN{N : N}(N) = + | POS(fNmag(N)) + | NEG(fNmag(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : N}(N) = POS_fN(SUBNORM_fNmag(0,)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : N, n : n}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : N}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : N}(N) = (2 ^ ((($signif(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b : byte}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- if (`%`_byte(ch!`%`_char.0,) = b) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : typeidx}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : funcidx}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : globalidx}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : tableidx}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : memidx}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : elemidx}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : dataidx}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : localidx}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : labelidx}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : tagidx}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : funcidx}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : globalidx}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : tableidx}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : memidx}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : tagidx}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = I32_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = $vsize(vectype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : Inn}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : n}(n) = ($inv_isize(n) : addrtype <: Jnn) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : n}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ($lunpack(lanetype) : numtype <: consttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = dt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : tagtype, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ([], []) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : tagtype, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : n, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : n}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : tagtype}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Inn : Inn}((Inn : addrtype <: numtype)) = iN($sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_{Pnn : Pnn}(Pnn) = iN($psizenn(Pnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_(lanetype : lanetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_(storagetype : storagetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{numtype : numtype}((numtype : numtype <: storagetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{vectype : vectype}((vectype : vectype <: storagetype)) = vec_(vectype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{packtype : packtype}((packtype : packtype <: storagetype)) = pack_(packtype) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__(numtype_1 : numtype, numtype_2 : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Inn_2 : Inn}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype)) = + | EXTEND(sx) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + | WRAP + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Fnn_2 : Fnn}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype)) = + | CONVERT(sx) + | REINTERPRET + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Inn_2 : Inn}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype)) = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype)) = + | PROMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + | DEMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) {Jnn : Jnn} + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ABS + | NEG + | POPCNT + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ADD + | SUB + | ADD_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | SUB_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | MUL + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + | AVGRU + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | Q15MULR_SATS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | RELAXED_Q15MULRS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | MIN(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + | MAX(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | RELAXED_LANESELECT + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | RELAXED_MADD + | RELAXED_NMADD + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | EQ + | NE + | LT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | LE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_{Jnn : Jnn, M : M}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_{M : M}(`%`_bshape(`%X%`_shape(I8_lanetype, M),)) = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTADD_PAIRWISE(sx) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTMUL(half : half, sx : sx) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + | DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | RELAXED_DOT_ADDS + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__(shape_1 : shape, shape_2 : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | EXTEND(half : half, sx : sx) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | CONVERT(`half?` : half?, sx : sx) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | DEMOTE(zero) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + | PROMOTELOW + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%_%`(sz : sz, sx : sx) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%`(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_{vectype : vectype}(vectype) = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + -- if (((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + | SPLAT(sz) + | ZERO(sz : sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_(numtype)?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_(numtype)?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_(vectype)?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_(numtype)) + | UNOP(numtype : numtype, unop_(numtype)) + | BINOP(numtype : numtype, binop_(numtype)) + | TESTOP(numtype : numtype, testop_(numtype)) + | RELOP(numtype : numtype, relop_(numtype)) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__(numtype_2, numtype_1)) + | VCONST(vectype : vectype, vec_(vectype)) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_(shape)) + | VBINOP(shape : shape, vbinop_(shape)) + | VTERNOP(shape : shape, vternop_(shape)) + | VTESTOP(shape : shape, vtestop_(shape)) + | VRELOP(shape : shape, vrelop_(shape)) + | VSHIFTOP(ishape : ishape, vshiftop_(ishape)) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_(bshape)) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__(ishape_2, ishape_1)) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__(ishape_2, ishape_1)) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__(shape_2, shape_1)) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_((consttype : consttype <: storagetype))) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : lit_(((numtype : numtype <: consttype) : consttype <: storagetype))}((numtype : numtype <: consttype), c) = CONST_instr(numtype, c) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : lit_(((vectype : vectype <: consttype) : consttype <: storagetype))}((vectype : vectype <: consttype), c) = VCONST_instr(vectype, c) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : typeidx}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : tagtype}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : expr}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : expr}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : typeidx, `local*` : local*, expr : expr}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : memidx, expr : expr}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : tableidx, expr : expr}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : funcidx}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = C + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : idx, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_idx.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype, `dt'*` : deftype*}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- if (dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`})) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype, `dt*` : deftype*}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype, `dt'*` : deftype*}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- if (dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : tagtype, `dt*` : deftype*}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype, `dt*` : deftype*}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype, `dt*` : deftype*}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- if (dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : n, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : typeidx}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_typeidx.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : n}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(NULL_null?{}, heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_typeidx.0] = dt) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype), heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(NULL_null?{}, ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_idx.0] = lct))*{lct <- `lct*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], comptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_idx.0 < x_0!`%`_idx.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_idx.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_idx.0 + 1),))) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(MUT_mut?{}, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : Inn}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), `%`_num_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), $fzero($size((Fnn : Fnn <: numtype))))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : Vnn}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?() + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_labelidx.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(NULL_null?{}, ht)],)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + -- if (x <- C.REFS_context) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(?(MUT_mut), zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_idx.0] = rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_M.0)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_(V128_Vnn)}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) = ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_(vt)}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_((Inn : addrtype <: numtype))}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [ADD_binop_ SUB_binop_ MUL_binop_]) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_idx.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(MUT_mut?{}, t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_idx.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_idx.0] = jt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = gt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_idx.0] = mt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_idx.0] = tt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_(numtype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_(vectype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_(storagetype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_((Cnn : Cnn <: storagetype)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = `%`_lane_(0,) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = $fzero($size((Fnn : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : N, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : N, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : N, i_1 : iN(N)}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : N, i_1 : iN(N)}(N, i_1) = (if ($signed_(N, i_1!`%`_iN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, U_sx, i) = `%`_iN((i!`%`_iN.0 \ (2 ^ K)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_iN.0 \ (2 ^ K)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 + i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_iN.0) : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 * i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_iN.0 : nat <:> int) - ((i_2!`%`_iN.0 * ($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N), j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_iN.0)) /\ (j_2 = $signed_(N, i_2!`%`_iN.0))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 <= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 > i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 >= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 < i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 + i_2!`%`_iN.0) : nat <:> int)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) + $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int))),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) - $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 = 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 =/= 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 < i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) < $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 > i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) > $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 <= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 >= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN(N)) : fN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : num_($lunpack((packtype : packtype <: lanetype)))}((packtype : packtype <: lanetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_(($cunpack((consttype : consttype <: storagetype)) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : lit_(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CLZ_unop_, i) = [$iclz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CTZ_unop_, i) = [$ictz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), POPCNT_unop_, i) = [$ipopcnt_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, N' : N, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EXTEND_unop_(`%`_sz(N',),), i) = [$iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, f) = $fabs_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, f) = $fneg_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, f) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, f) = $fceil_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, f) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, f) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, f) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), f) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ADD_binop_, i_1, i_2) = [$iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SUB_binop_, i_1, i_2) = [$isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), MUL_binop_, i_1, i_2) = [$imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), DIV_binop_(sx), i_1, i_2) = lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), REM_binop_(sx), i_1, i_2) = lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), AND_binop_, i_1, i_2) = [$iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), OR_binop_, i_1, i_2) = [$ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), XOR_binop_, i_1, i_2) = [$ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHL_binop_, i_1, i_2) = [$ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHR_binop_(sx), i_1, i_2) = [$ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTL_binop_, i_1, i_2) = [$irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTR_binop_, i_1, i_2) = [$irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, f_1, f_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, f_1, f_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, f_1, f_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, f_1, f_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, f_1, f_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, f_1, f_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, f_1, f_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQZ_testop_, i) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQ_relop_, i_1, i_2) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), NE_relop_, i_1, i_2) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LT_relop_(sx), i_1, i_2) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GT_relop_(sx), i_1, i_2) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LE_relop_(sx), i_1, i_2) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GE_relop_(sx), i_1, i_2) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, f_1, f_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, f_1, f_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, f_1, f_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, f_1, f_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, f_1, f_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, f_1, f_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), EXTEND_cvtop__(sx), i_1) = [$extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), WRAP_cvtop__, i_1) = [$wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_cvtop__(sx), f_1) = lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_SAT_cvtop__(sx), f_1) = lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), i_1) = [$convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, f_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, f_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, i_1) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), i_1)] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), REINTERPRET_cvtop__, f_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), f_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_iN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_iN.0] else `%`_iN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_iN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_iN.0] else (if ($signed_(N, i!`%`_iN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN(N), `%`_iN(0,), c*{c <- `c*`}[(i!`%`_iN.0 \ |c*{c <- `c*`}|)]))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c**` : lane_((Jnn : Jnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn), `c**` : lane_((Jnn : Jnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn), `c**` : lane_((Fnn : Fnn <: lanetype))**, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), Inn : Inn, `c*` : iN($sizenn((Fnn : Fnn <: numtype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), `%`_lane_(c!`%`_iN.0,)*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- if ($isize(Inn) = $fsize(Fnn)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), i : u32, `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), i : u32, `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), c : iN(32), `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, c_1, `%`_iN(0,))!`%`_u32.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_M.0 : nat <:> int)) : int <:> nat){}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : M, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1*{c_1 <- `c_1*`}, c_2)*{c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2)) + -- if (c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_laneidx.0]*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : Vnn, v : vec_(Vnn)}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn), v_3 : vec_(Vnn)}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ABS_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEG_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SQRT_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), CEIL_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), FLOOR_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), TRUNC_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEAREST_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ABS_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NEG_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), POPCNT_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MIN_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MAX_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), AVGRU_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), Q15MULR_SATS_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_Q15MULRS_vbinop_, v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), DIV_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_LANESELECT_vternop_, v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_NMADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), lane_ : lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1))), c : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx), c_1) = [c] + -- if (c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1))), c : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx), c_1) = [c] + -- if (c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- if (c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(ZERO_zero), c_1) = c*{c <- `c*`} + -- if (c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1))), `c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__, c_1) = c*{c <- `c*`} + -- if (c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M : M, Lnn_2 : Lnn, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), half : half, `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_M.0) : M_2!`%`_M.0]) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*, `c**` : lane_(Lnn_2)**}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)) + -- if (c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_M.0{})) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHL_vshiftop_, v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, sx : sx, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHR_vshiftop_(sx), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_(bshape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), RELAXED_SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v : vec_(V128_Vnn), `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*, `c'_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)) + -- if (c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`}) + -- if (c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_2)*{c_2 <- `c_2*`}) + -- if (v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c'_1*{c'_1 <- `c'_1*`} ++ c'_2*{c'_2 <- `c'_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : N, `i*` : iN(N)*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_iN.0*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn), `c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)) + -- if (c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`}) + -- if (c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTADD_PAIRWISE_vextunop__(sx), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx_1 : sx, sx_2 : sx, i : laneidx, k : laneidx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), `c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, `c'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- if (c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_laneidx.0 : k!`%`_laneidx.0]) + -- if (c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_laneidx.0 : k!`%`_laneidx.0]) + -- if (c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, c_1)*{c_1 <- `c_1*`}) + -- if (c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, c_2)*{c_2 <- `c_2*`}) + -- if (c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN(N)*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTMUL_vextbinop__(half, sx), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_M.0),), `%`_laneidx(M_2!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn), N : N, `ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*, `ci'_1*` : iN(N)*, `ci'_2*` : iN(N)*, `ci*` : iN(N)*, `ci'*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*, c' : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOT_ADDS_vextternop__, c_1, c_2, c_3) = c + -- if (N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype)))) + -- if (ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1)) + -- if (ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2)) + -- if (ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, ci_1)*{ci_1 <- `ci_1*`}) + -- if (ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`}) + -- if (ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`})) + -- if (ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`}) + -- if (c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`}))) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), ADD_vbinop_, c', c_3)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_(numtype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_(vectype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = (val : val <: fieldval) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : num_(I32_numtype)}((packtype : packtype <: storagetype), CONST_val(I32_numtype, i)) = PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : iN($psizenn(packtype))}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = CONST_val(I32_numtype, $extend__($psize(packtype), 32, sx, i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : addr, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : addr, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : addr, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : addr, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : addr, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : addr}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : addr}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : addr}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : addr}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : idx}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : idx}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : idx}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : idx}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : idx}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : idx}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : idx}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : idx}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : idx}(z, x) = $fof(z).LOCALS_frame[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_idx.0] = ?(v)]) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]].VALUE_globalinst = v], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : idx, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]].REFS_tableinst[i] = r], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : idx, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] = ti], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : idx, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : idx, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] = mi], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : idx, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : idx, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : n, r : ref, tableinst' : tableinst, at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*, i' : u64}(tableinst, n, r) = tableinst' + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}}) + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_u64.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if ((i'!`%`_u64.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : n, meminst' : meminst, at : addrtype, i : u64, `j?` : u64?, `b*` : byte*, i' : u64}(meminst, n) = meminst' + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}}) + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_u64.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if (i'!`%`_u64.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : addr}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_(nt)}: + `%|-%:%`(s, CONST_num(nt, c), nt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_(vt)}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN($psizenn(pt))}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_labelidx.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_labelidx.0 > 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[i!`%`_num_.0])]) + -- if (i!`%`_num_.0 < |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (i!`%`_num_.0 >= |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_(I32_numtype)}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref_1 = ref_2) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, $extend__(31, 32, sx, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_(nt), unop : unop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_(nt), unop : unop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_(nt), testop : testop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $testop_(nt, testop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), relop : relop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $relop_(nt, relop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2), c : num_(nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_(V128_Vnn), vvunop : vvunop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), vvbinop : vvbinop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), vvternop : vvternop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_(V128_Vnn), c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $inez_($vsize(V128_vectype), c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_(V128_Vnn), Jnn : Jnn, M : M, c : num_(I32_numtype), `i*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (c!`%`_num_.0 = $prod($inez_($jsizenn(Jnn), i)!`%`_u32.0*{i <- `i*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_(V128_Vnn), i : num_(I32_numtype), sh : ishape, vshiftop : vshiftop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, i)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_(V128_Vnn), sh : ishape, c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (c = $vbitmaskop_(sh, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, swizzlop : vswizzlop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, `i*` : laneidx*, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_(V128_Vnn), nt : numtype, M : M, i : laneidx, c_2 : num_(nt)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (c_2 = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_(V128_Vnn), pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (c_2 = $extend__($psize(pt), 32, sx, $lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_(V128_Vnn), Lnn : Lnn, c_2 : num_($lunpack(Lnn)), M : M, i : laneidx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_laneidx.0] = $lpacknum_(Lnn, c_2)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_(V128_Vnn), sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[i!`%`_num_.0] : ref <: instr)]) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((i_2!`%`_num_.0 + n) > |$table(z, x_2).REFS_tableinst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[j!`%`_num_.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg, c : num_(nt)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN(n)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg, c : vec_(V128_Vnn)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((K * M!`%`_M.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_(V128_Vnn), `j*` : iN(K)*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), `%`_lane_(j!`%`_iN.0,)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, c : vec_(V128_Vnn), k : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_laneidx.0] = `%`_lane_(k!`%`_iN.0,)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((i_2!`%`_num_.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((j!`%`_num_.0 + n) > |$data(z, y).BYTES_datainst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, `%`_num_($data(z, y).BYTES_datainst[j!`%`_num_.0]!`%`_byte.0,)) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0])]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ($default_($unpack(zt)) = ?(val)))*{val <- `val*`, zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [($unpackfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_fieldidx.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[i!`%`_num_.0 : n]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((i!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_(zt)*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), $const($cunpack(zt), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[i!`%`_num_.0 : ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[i!`%`_num_.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, `%`_num_(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_(I32_numtype), ref : ref, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_(I32_numtype), i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_1!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_2!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_((i_1!`%`_num_.0 + 1),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((i_1!`%`_num_.0 <= i_2!`%`_num_.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[j!`%`_num_.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((j!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, c : lit_(zt), `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const($cunpack(zt), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[j!`%`_num_.0 : ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`($as_deftype($tag(z, x).TYPE_taginst), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0], FIELDS val^n{val <- `val*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, i!`%`_num_.0, ref), [])) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), `%`_num_(|$table(z, x).REFS_tableinst|,))])) + -- if (ti = $growtable($table(z, x), n, ref)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, c))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_laneidx.0]!`%`_lane_.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), `%`_num_((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),))])) + -- if (mi = $growmem($mem(z, x), n)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_fieldidx.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], val)), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, i!`%`_num_.0, $packfield_(zt, val)), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype'*` : deftype*, `deftype*` : deftype*, rectype : rectype, x : idx}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- if (deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`})) + -- if (type = TYPE_type(rectype)) + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_idx.0 = |deftype'*{deftype' <- `deftype'*`}|) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : tagtype, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : tagtype, `tagtype'*` : tagtype*, s_2 : store, ja : tagaddr, `ja'*` : tagaddr*, s_1 : store}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- if ((s_1, ja) = $alloctag(s, tagtype)) + -- if ((s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*, s_2 : store, ga : globaladdr, `ga'*` : globaladdr*, s_1 : store}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- if ((s_1, ga) = $allocglobal(s, globaltype, val)) + -- if ((s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : u64, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_u64.0 * (64 * $Ki)){}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*, s_2 : store, ma : memaddr, `ma'*` : memaddr*, s_1 : store}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- if ((s_1, ma) = $allocmem(s, memtype)) + -- if ((s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : u64, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_u64.0{}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*, s_2 : store, ta : tableaddr, `ta'*` : tableaddr*, s_1 : store}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- if ((s_1, ta) = $alloctable(s, tabletype, ref)) + -- if ((s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*, s_2 : store, fa : funcaddr, `fa'*` : funcaddr*, s_1 : store}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- if ((s_1, fa) = $allocfunc(s, dt, funccode, moduleinst)) + -- if ((s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**, s_2 : store, da : dataaddr, `da'*` : dataaddr*, s_1 : store}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- if ((s_1, da) = $allocdata(s, ok, b*{b <- `b*`})) + -- if ((s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : elemtype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**, s_2 : store, ea : elemaddr, `ea'*` : elemaddr*, s_1 : store}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- if ((s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`})) + -- if ((s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_idx.0])} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `aa_I*` : tagaddr*, `ga_I*` : globaladdr*, `ma_I*` : memaddr*, `ta_I*` : tableaddr*, `fa_I*` : funcaddr*, `dt*` : deftype*, `fa*` : nat*, s_1 : store, `aa*` : tagaddr*, s_2 : store, `ga*` : globaladdr*, s_3 : store, `ma*` : memaddr*, s_4 : store, `ta*` : tableaddr*, s_5 : store, `da*` : dataaddr*, s_6 : store, `ea*` : elemaddr*, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- if (module = MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- if (aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`})) + -- if (fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`})) + -- if (dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`})) + -- if (fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}) + -- if ((s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`})) + -- if ((s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`})) + -- if ((s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`})) + -- if ((s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`})) + -- if ((s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`})) + -- if ((s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`})) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_idx.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*, y : idx, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*, y : idx, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : expr, `expr'*` : expr*, z'' : state, ref : ref, `ref'*` : ref*, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- if ((z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**, z'' : state, `ref*` : ref*, `ref'**` : ref**, z' : state}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- if ((z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`})) + -- if ((z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : expr, `expr'*` : expr*, z'' : state, val : val, `val'*` : val*, z' : state, s : store, f : frame, s' : store, a : addr}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- if (z' = `%;%`_state(s, f)) + -- if ((s', a) = $allocglobal(s, gt, val)) + -- if ((z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`})) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, s'''' : store, moduleinst : moduleinst, `instr_E*` : instr*, `instr_D*` : instr*, `instr_S?` : instr?, `xt_I*` : externtype*, `xt_E*` : externtype*, `type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, z' : state, `val_G*` : val*, z'' : state, `ref_T*` : ref*, z''' : state, `ref_E**` : ref**, s''' : store, f : frame, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- if (module = MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- if ((z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`})) + -- if ((z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`})) + -- if ((z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`})) + -- if (z''' = `%;%`_state(s''', f)) + -- if ((s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`})) + -- if (instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){})) + -- if (instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){})) + -- if (instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : funcaddr, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag(N) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : I, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_idx.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, $with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, ADD_binop_)], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(mut), t)) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_(F64_numtype), q_4 : num_(F64_numtype), q_3 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, ADD_binop_) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_(F64_numtype), q_5 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*, s_2 : store, a : addr, `a'*` : addr*, s_1 : store}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- if ((s_1, a) = $allocX(syntax X, syntax Y, s, X, Y)) + -- if ((s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`})) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat)), n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN(N)} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(32)} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(64)} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN(33)} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(32)} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(64)} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(32)} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(64)} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_s33.0 : int <:> nat),)) + -- if (i!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_labelidx.0,):Bbyte => `%`_laneidx(l!`%`_labelidx.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_labelidx.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(NULL_null?{}, ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => $opt_(syntax start, startopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => $opt_(syntax u32, nopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:({Tidchar} | {Tstring} | {","} | {";"} | {"["} | {"]"} | {"{"} | {"}"})+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} (Tnewline | Teof)} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:({" "} | Tformat | Tcomment | Tannot)*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {(Tspace | Ttoken)*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN(N)} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} ({"E"} | {"e"}) {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} ({"P"} | {"p"}) {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ $signif(N)))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(8)} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(32)} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(64)} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(8)} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(16)} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(32)} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(64)} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(32)} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(64)} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_idx.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_idx.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_idx.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_idx.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod (Bvar(syntax symdots) | Bvar(syntax B)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod (Tvar(syntax symdots) | Tvar(syntax T)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/02-let-intro-mech.il b/spectec/test-middlend/specification.exp/02-let-intro-mech.il new file mode 100644 index 0000000000..ac150c12da --- /dev/null +++ b/spectec/test-middlend/specification.exp/02-let-intro-mech.il @@ -0,0 +1,11788 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : n, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?() + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(w) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : n}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : n, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN{N : N}(N) = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN{N : N}(N) = + | `%`(i : int,) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN(8) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN(16) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN(31) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN(33) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = 23 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = 52 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = 8 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = 11 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : N}(N) = $signif(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : N}(N) = $expon(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag{N : N}(N) = + | NORM(m : m, exp : exp) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + | SUBNORM(m : m,) {exp : exp} + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + | INF + | NAN(m : m,) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN{N : N}(N) = + | POS(fNmag(N)) + | NEG(fNmag(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : N}(N) = POS_fN(SUBNORM_fNmag(0,)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : N, n : n}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : N}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : N}(N) = (2 ^ ((($signif(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : idx, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : idx, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : idx, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : idx, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : idx, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : typeidx}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : funcidx}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : globalidx}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : tableidx}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : memidx}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : elemidx}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : dataidx}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : localidx}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : labelidx}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : tagidx}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : funcidx}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : globalidx}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : tableidx}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : memidx}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : tagidx}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = I32_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = $vsize(vectype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : Inn}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : n}(n) = ($inv_isize(n) : addrtype <: Jnn) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : n}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ($lunpack(lanetype) : numtype <: consttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = dt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : tagtype, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ([], []) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : tagtype, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : n, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : n}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : tagtype}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Inn : Inn}((Inn : addrtype <: numtype)) = iN($sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax num_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_{Pnn : Pnn}(Pnn) = iN($psizenn(Pnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_(lanetype : lanetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_(storagetype : storagetype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{numtype : numtype}((numtype : numtype <: storagetype)) = num_(numtype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{vectype : vectype}((vectype : vectype <: storagetype)) = vec_(vectype) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax lit_{packtype : packtype}((packtype : packtype <: storagetype)) = pack_(packtype) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax unop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax binop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_(numtype : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax relop_{Fnn : Fnn}((Fnn : Fnn <: numtype)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__(numtype_1 : numtype, numtype_2 : numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Inn_2 : Inn}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype)) = + | EXTEND(sx) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + | WRAP + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Inn_1 : Inn, Fnn_2 : Fnn}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype)) = + | CONVERT(sx) + | REINTERPRET + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Inn_2 : Inn}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype)) = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype)) = + | PROMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + | DEMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : Lnn, M : M}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) {Jnn : Jnn} + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ABS + | NEG + | POPCNT + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vunop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ADD + | SUB + | ADD_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | SUB_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | MUL + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + | AVGRU + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | Q15MULR_SATS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | RELAXED_Q15MULRS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | MIN(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + | MAX(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vbinop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | RELAXED_LANESELECT + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vternop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | RELAXED_MADD + | RELAXED_NMADD + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_(shape : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Jnn : Jnn, M : M}(`%X%`_shape((Jnn : Jnn <: lanetype), M)) = + | EQ + | NE + | LT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | LE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vrelop_{Fnn : Fnn, M : M}(`%X%`_shape((Fnn : Fnn <: lanetype), M)) = + | EQ + | NE + | LT + | GT + | LE + | GE + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_{Jnn : Jnn, M : M}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_{M : M}(`%`_bshape(`%X%`_shape(I8_lanetype, M),)) = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTADD_PAIRWISE(sx) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | EXTMUL(half : half, sx : sx) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + | DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) = + | RELAXED_DOT_ADDS + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__(shape_1 : shape, shape_2 : shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | EXTEND(half : half, sx : sx) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | CONVERT(`half?` : half?, sx : sx) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) = + | DEMOTE(zero) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + | PROMOTELOW + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%_%`(sz : sz, sx : sx) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_{Inn : Inn}((Inn : addrtype <: numtype)) = + | `%`(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_{vectype : vectype}(vectype) = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + -- if (((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + | SPLAT(sz) + | ZERO(sz : sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_(numtype)?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_(numtype)?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_(vectype)?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_(numtype)) + | UNOP(numtype : numtype, unop_(numtype)) + | BINOP(numtype : numtype, binop_(numtype)) + | TESTOP(numtype : numtype, testop_(numtype)) + | RELOP(numtype : numtype, relop_(numtype)) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__(numtype_2, numtype_1)) + | VCONST(vectype : vectype, vec_(vectype)) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_(shape)) + | VBINOP(shape : shape, vbinop_(shape)) + | VTERNOP(shape : shape, vternop_(shape)) + | VTESTOP(shape : shape, vtestop_(shape)) + | VRELOP(shape : shape, vrelop_(shape)) + | VSHIFTOP(ishape : ishape, vshiftop_(ishape)) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_(bshape)) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__(ishape_2, ishape_1)) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__(ishape_2, ishape_1)) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__(shape_2, shape_1)) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_((consttype : consttype <: storagetype))) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : lit_(((numtype : numtype <: consttype) : consttype <: storagetype))}((numtype : numtype <: consttype), c) = CONST_instr(numtype, c) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : lit_(((vectype : vectype <: consttype) : consttype <: storagetype))}((vectype : vectype <: consttype), c) = VCONST_instr(vectype, c) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : typeidx}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : tagidx, labelidx : labelidx}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : labelidx}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : tagtype}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : expr}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : expr}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : typeidx, `local*` : local*, expr : expr}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : memidx, expr : expr}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : tableidx, expr : expr}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : funcidx}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = C + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : idx, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_idx.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : tagtype}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : n, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : typeidx}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_typeidx.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : n}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(NULL_null?{}, heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_typeidx.0] = dt) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype), heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(NULL_null?{}, ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_idx.0] = lct))*{lct <- `lct*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], comptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_idx.0 < x_0!`%`_idx.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_idx.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_idx.0 + 1),))) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(MUT_mut?{}, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_labelidx.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_labelidx.0]) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : Inn}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), `%`_num_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), $fzero($size((Fnn : Fnn <: numtype))))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : Vnn}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?() + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_labelidx.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_labelidx.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0]!`%`_resulttype.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(NULL_null?{}, ht)],)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + -- if (x <- C.REFS_context) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(?(MUT_mut), zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_idx.0] = rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_M.0)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_(V128_Vnn)}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) = ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_(vt)}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_((Inn : addrtype <: numtype))}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [ADD_binop_ SUB_binop_ MUL_binop_]) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_idx.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(MUT_mut?{}, t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_idx.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_idx.0] = jt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_idx.0] = gt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_idx.0] = mt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_idx.0] = tt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_(numtype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_(vectype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_(storagetype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_((Cnn : Cnn <: storagetype)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : N, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : N, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = `%`_lane_(0,) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = $fzero($size((Fnn : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : N, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : N, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : N, i_1 : iN(N)}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : N, i_1 : iN(N)}(N, i_1) = (if ($signed_(N, i_1!`%`_iN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, U_sx, i) = `%`_iN((i!`%`_iN.0 \ (2 ^ K)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : N, K : K, i : iN(N)}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_iN.0 \ (2 ^ K)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 + i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_iN.0) : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_iN.0 * i_2!`%`_iN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_iN.0) : int <:> rat) / ($signed_(N, i_2!`%`_iN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_iN.0 : nat <:> int) - ((i_2!`%`_iN.0 * ($truncz(((i_1!`%`_iN.0 : nat <:> rat) / (i_2!`%`_iN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : N, i_1 : iN(N), i_2 : iN(N), j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_iN.0)) /\ (j_2 = $signed_(N, i_2!`%`_iN.0))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 <= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 > i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_iN.0 >= i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_iN.0 < i_2!`%`_iN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 + i_2!`%`_iN.0) : nat <:> int)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) + $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_iN.0 : nat <:> int) - (i_2!`%`_iN.0 : nat <:> int))),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_iN.0) - $signed_(N, i_2!`%`_iN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 = 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : N, i_1 : iN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_iN.0 =/= 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 < i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) < $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 > i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) > $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 <= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) <= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_iN.0 >= i_2!`%`_iN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : N, i_1 : iN(N), i_2 : iN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_iN.0) >= $signed_(N, i_2!`%`_iN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN(N)) : fN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : num_($lunpack((packtype : packtype <: lanetype)))}((packtype : packtype <: lanetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_(($cunpack((consttype : consttype <: storagetype)) : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : lit_(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype))}((packtype : packtype <: storagetype), c) = $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : lane_((packtype : packtype <: lanetype))}((packtype : packtype <: lanetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : lit_((packtype : packtype <: storagetype))}((packtype : packtype <: storagetype), c) = $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CLZ_unop_, i) = [$iclz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), CTZ_unop_, i) = [$ictz_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), POPCNT_unop_, i) = [$ipopcnt_($sizenn((Inn : addrtype <: numtype)), i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : Inn, N' : N, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EXTEND_unop_(`%`_sz(N',),), i) = [$iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ABS_unop_, f) = $fabs_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEG_unop_, f) = $fneg_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SQRT_unop_, f) = $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), CEIL_unop_, f) = $fceil_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), FLOOR_unop_, f) = $ffloor_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), TRUNC_unop_, f) = $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NEAREST_unop_, f) = $fnearest_($sizenn((Fnn : Fnn <: numtype)), f) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ADD_binop_, i_1, i_2) = [$iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SUB_binop_, i_1, i_2) = [$isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), MUL_binop_, i_1, i_2) = [$imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), DIV_binop_(sx), i_1, i_2) = lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), REM_binop_(sx), i_1, i_2) = lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), AND_binop_, i_1, i_2) = [$iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), OR_binop_, i_1, i_2) = [$ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), XOR_binop_, i_1, i_2) = [$ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHL_binop_, i_1, i_2) = [$ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), SHR_binop_(sx), i_1, i_2) = [$ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTL_binop_, i_1, i_2) = [$irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), ROTR_binop_, i_1, i_2) = [$irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), ADD_binop_, f_1, f_2) = $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), SUB_binop_, f_1, f_2) = $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MUL_binop_, f_1, f_2) = $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), DIV_binop_, f_1, f_2) = $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MIN_binop_, f_1, f_2) = $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), MAX_binop_, f_1, f_2) = $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), COPYSIGN_binop_, f_1, f_2) = $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : Inn, i : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQZ_testop_, i) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), EQ_relop_, i_1, i_2) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), NE_relop_, i_1, i_2) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LT_relop_(sx), i_1, i_2) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GT_relop_(sx), i_1, i_2) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), LE_relop_(sx), i_1, i_2) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : Inn, sx : sx, i_1 : num_((Inn : addrtype <: numtype)), i_2 : num_((Inn : addrtype <: numtype))}((Inn : addrtype <: numtype), GE_relop_(sx), i_1, i_2) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), EQ_relop_, f_1, f_2) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), NE_relop_, f_1, f_2) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LT_relop_, f_1, f_2) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GT_relop_, f_1, f_2) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), LE_relop_, f_1, f_2) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : num_((Fnn : Fnn <: numtype)), f_2 : num_((Fnn : Fnn <: numtype))}((Fnn : Fnn <: numtype), GE_relop_, f_1, f_2) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), EXTEND_cvtop__(sx), i_1) = [$extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Inn_2 : Inn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), WRAP_cvtop__, i_1) = [$wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_cvtop__(sx), f_1) = lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, sx : sx, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), TRUNC_SAT_cvtop__(sx), f_1) = lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, sx : sx, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), CONVERT_cvtop__(sx), i_1) = [$convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1)] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), PROMOTE_cvtop__, f_1) = $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), DEMOTE_cvtop__, f_1) = $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : Inn, Fnn_2 : Fnn, i_1 : num_((Inn_1 : addrtype <: numtype))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), REINTERPRET_cvtop__, i_1) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), i_1)] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : Inn, f_1 : num_((Fnn_1 : Fnn <: numtype))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), REINTERPRET_cvtop__, f_1) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), f_1)] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx)) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx)) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(zero)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_iN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_iN.0] else `%`_iN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : N, `c*` : iN(N)*, i : iN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_iN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_iN.0] else (if ($signed_(N, i!`%`_iN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN(N), `%`_iN(0,), c*{c <- `c*`}[(i!`%`_iN.0 \ |c*{c <- `c*`}|)]))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1)*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1)*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_((Jnn : Jnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_((Jnn : Jnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), c*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), $f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2, c_3)*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : M, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), Inn : Inn}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), `%`_lane_(c!`%`_iN.0,)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN($sizenn((Fnn : Fnn <: numtype)))*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), c_1, c_2)!`%`_u32.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : M, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), i : u32}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : M, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : vec_(V128_Vnn), i : u32}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, c_1, `%`_iN(i!`%`_u32.0,))*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), c : iN(32)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, c_1, `%`_iN(0,))!`%`_u32.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_M.0 : nat <:> int)) : int <:> nat){}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : M, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), c_1*{c_1 <- `c_1*`}, c_2)*{c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_laneidx.0]*{i <- `i*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : Vnn, v : vec_(Vnn)}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn)}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : Vnn, v_1 : vec_(Vnn), v_2 : vec_(Vnn), v_3 : vec_(Vnn)}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ABS_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEG_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SQRT_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), CEIL_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), FLOOR_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), TRUNC_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NEAREST_vunop_, v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ABS_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NEG_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), POPCNT_vunop_, v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), ADD_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), SUB_SAT_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MIN_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), MAX_vbinop_(sx), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), AVGRU_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), Q15MULR_SATS_vbinop_, v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_Q15MULRS_vbinop_, v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), ADD_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), SUB_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MUL_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), DIV_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), PMAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MIN_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MAX_vbinop_, v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), RELAXED_LANESELECT_vternop_, v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_MADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn), v_3 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), RELAXED_NMADD_vternop_, v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GT_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), LE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), GE_vrelop_(sx,), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), EQ_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), NE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GT_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), LE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), GE_vrelop_, v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), lane_ : lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), EXTEND_vcvtop__(half, sx), c_1) = [c] + -- let{c : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx, c_1 : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), CONVERT_vcvtop__(half?{half <- `half?`}, sx), c_1) = [c] + -- let{c : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- let{`c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`}), c_1) = lift(c?{c <- `c?`}) + -- let{`c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), DEMOTE_vcvtop__(ZERO_zero), c_1) = c*{c <- `c*`} + -- let{`c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, c_1 : lane_($lanetype(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), PROMOTELOW_vcvtop__, c_1) = c*{c <- `c*`} + -- let{`c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M : M, Lnn_2 : Lnn, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn)}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn), half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_M.0) : M_2!`%`_M.0] + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : Lnn, M_1 : M, Lnn_2 : Lnn, M_2 : M, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : vec_(V128_Vnn), v : vec_(V128_Vnn)}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_M.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHL_vshiftop_, v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : M, sx : sx, v : vec_(V128_Vnn), i : u32}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), SHR_vshiftop_(sx), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_u32.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : M, v : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_(bshape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), RELAXED_SWIZZLE_vswizzlop_, v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : M, `i*` : laneidx*, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, c_2)*{c_2 <- `c_2*`} + -- let{v : vec_(V128_Vnn)} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c'_1*{c'_1 <- `c'_1*`} ++ c'_2*{c'_2 <- `c'_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : N, `i*` : iN(N)*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_iN.0*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, v_1 : vec_(V128_Vnn)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1)*{c_1 <- `c_1*`} + -- let{`c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, v_1 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTADD_PAIRWISE_vextunop__(sx), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx_1 : sx, sx_2 : sx, i : laneidx, k : laneidx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_laneidx.0 : k!`%`_laneidx.0] + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_laneidx.0 : k!`%`_laneidx.0] + -- let{`c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, c_1)*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, c_2)*{c_2 <- `c_2*`} + -- let{`c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : N, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN(N)*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), EXTMUL_vextbinop__(half, sx), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_M.0),), `%`_laneidx(M_2!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_1 : vec_(V128_Vnn), v_2 : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOTS_vextbinop__, v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_M.0,), v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), c : vec_(V128_Vnn)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), RELAXED_DOT_ADDS_vextternop__, c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN(N)*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, ci_1)*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN(N)*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), ci_2)*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN(N)*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_(V128_Vnn)} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), ADD_vbinop_, c', c_3)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_(numtype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_(vectype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = (val : val <: fieldval) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : num_(I32_numtype)}((packtype : packtype <: storagetype), CONST_val(I32_numtype, i)) = PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : iN($psizenn(packtype))}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = CONST_val(I32_numtype, $extend__($psize(packtype), 32, sx, i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : addr, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : addr, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : addr, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : addr, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : addr, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : addr}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : addr}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : addr}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : addr}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : idx}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : idx}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : idx}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : idx}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : idx}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : idx}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : idx}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : idx}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : idx}(z, x) = $fof(z).LOCALS_frame[x!`%`_idx.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_idx.0] = ?(v)]) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : idx, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_idx.0]].VALUE_globalinst = v], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : idx, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]].REFS_tableinst[i] = r], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : idx, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_idx.0]] = ti], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : idx, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : idx, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_idx.0]] = mi], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : idx, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_idx.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : idx, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_idx.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : addr, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : n, r : ref, tableinst' : tableinst, i' : u64}(tableinst, n, r) = tableinst' + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_u64.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if ((i'!`%`_u64.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : n, meminst' : meminst, i' : u64}(meminst, n) = meminst' + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_u64.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_u64.0 <= j!`%`_u64.0))?{j <- `j?`} + -- if (i'!`%`_u64.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : addr}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_(nt)}: + `%|-%:%`(s, CONST_num(nt, c), nt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_(vt)}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN($psizenn(pt))}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_labelidx.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_labelidx.0 > 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (c!`%`_num_.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (c!`%`_num_.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[i!`%`_num_.0])]) + -- if (i!`%`_num_.0 < |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (i!`%`_num_.0 >= |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_(I32_numtype)}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- if (ref_1 = ref_2) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, $extend__(31, 32, sx, i))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_(nt), unop : unop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_(nt), unop : unop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_(nt), testop : testop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $testop_(nt, testop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), relop : relop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $relop_(nt, relop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2), c : num_(nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_(V128_Vnn), vvunop : vvunop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), vvbinop : vvbinop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), vvternop : vvternop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_(V128_Vnn), c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (c = $inez_($vsize(V128_vectype), c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_(V128_Vnn), Jnn : Jnn, M : M, c : num_(I32_numtype), `i*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), ALL_TRUE_vtestop_)], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (c!`%`_num_.0 = $prod($inez_($jsizenn(Jnn), i)!`%`_u32.0*{i <- `i*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_(V128_Vnn), i : num_(I32_numtype), sh : ishape, vshiftop : vshiftop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, i)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_(V128_Vnn), sh : ishape, c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (c = $vbitmaskop_(sh, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, swizzlop : vswizzlop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, `i*` : laneidx*, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_(V128_Vnn), nt : numtype, M : M, i : laneidx, c_2 : num_(nt)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (c_2 = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_(V128_Vnn), pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (c_2 = $extend__($psize(pt), 32, sx, $lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_(V128_Vnn), Lnn : Lnn, c_2 : num_($lunpack(Lnn)), M : M, i : laneidx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_laneidx.0] = $lpacknum_(Lnn, c_2)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_(V128_Vnn), sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[i!`%`_num_.0] : ref <: instr)]) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((i_2!`%`_num_.0 + n) > |$table(z, x_2).REFS_tableinst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.COPY`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[j!`%`_num_.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `TABLE.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg, c : num_(nt)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN(n)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(`%_%`_loadop_(`%`_sz(n,), sx)), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg, c : vec_(V128_Vnn)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((K * M!`%`_M.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_(V128_Vnn), `j*` : iN(K)*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), `%`_lane_(j!`%`_iN.0,)^M!`%`_M.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, c : vec_(V128_Vnn), k : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_laneidx.0] = `%`_lane_(k!`%`_iN.0,)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), `%`_num_(n,))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((i_1!`%`_num_.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((i_2!`%`_num_.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), `%`_num_((i_1!`%`_num_.0 + 1),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (i_1!`%`_num_.0 <= i_2!`%`_num_.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_(n,)) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x_2, $memarg0) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((i!`%`_num_.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((j!`%`_num_.0 + n) > |$data(z, y).BYTES_datainst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, `%`_num_($data(z, y).BYTES_datainst[j!`%`_num_.0]!`%`_byte.0,)) STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, $memarg0) CONST_instr((at : addrtype <: numtype), `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_idx.0])]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(1,))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, `%`_num_(0,))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ($default_($unpack(zt)) = ?(val)))*{val <- `val*`, zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [($unpackfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_fieldidx.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[i!`%`_num_.0 : n]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((i!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_(zt)*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.NEW_DATA`_instr(x, y)]), $const($cunpack(zt), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[i!`%`_num_.0 : ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[i!`%`_num_.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, `%`_num_(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) (val : val <: instr) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_(I32_numtype), ref : ref, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_(I32_numtype), i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_1!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((i_2!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_((i_1!`%`_num_.0 + 1),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_((i_2!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((i_1!`%`_num_.0 <= i_2!`%`_num_.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, `%`_num_(((((i_1!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, `%`_num_(((((i_2!`%`_num_.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((j!`%`_num_.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[j!`%`_num_.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((i!`%`_num_.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((j!`%`_num_.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, c : lit_(zt), `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, `%`_num_(n,)) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const($cunpack(zt), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, `%`_num_((i!`%`_num_.0 + 1),)) CONST_instr(I32_numtype, `%`_num_((j!`%`_num_.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),)) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[j!`%`_num_.0 : ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`($as_deftype($tag(z, x).TYPE_taginst), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_idx.0], FIELDS val^n{val <- `val*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, i!`%`_num_.0, ref), [])) + -- if (i!`%`_num_.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), `%`_num_(|$table(z, x).REFS_tableinst|,))])) + -- if (ti = $growtable($table(z, x), n, ref)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(`%`_storeop_(`%`_sz(n,),)), x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, c))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (i!`%`_num_.0 + ao.OFFSET_memarg!`%`_u64.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_M.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_laneidx.0]!`%`_lane_.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), `%`_num_((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),))])) + -- if (mi = $growmem($mem(z, x), n)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_(n,)) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), `%`_num_($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_fieldidx.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_fieldidx.0], val)), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (i!`%`_num_.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, i!`%`_num_.0, $packfield_(zt, val)), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : idx}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_idx.0 = |deftype'*{deftype' <- `deftype'*`}|) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : tagtype, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : tagtype, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : u64, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_u64.0 * (64 * $Ki)){}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : u64, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_u64.0{}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : elemtype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_idx.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : idx}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_idx.0])} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_idx.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : idx, n : n, `b*` : byte*, y : idx, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : idx, rt : reftype, n : n, `e*` : expr*, y : idx, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, `%`_num_(0,)) CONST_instr(I32_numtype, `%`_num_(n,)) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : expr, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : expr, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : funcaddr, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag(N) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : I, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_idx.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, $with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, ADD_binop_)], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(mut), t)) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_(F64_numtype), q_4 : num_(F64_numtype), q_3 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, ADD_binop_) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_(F64_numtype), q_5 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, MUL_binop_)],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat)), n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN(N)} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(32)} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(64)} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN(33)} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(32)} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(64)} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(32)} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(64)} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_s33.0 : int <:> nat),)) + -- if (i!`%`_s33.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_labelidx.0,):Bbyte => `%`_laneidx(l!`%`_labelidx.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, p) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_labelidx.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(NULL_null?{}, ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => $opt_(syntax start, startopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => $opt_(syntax u32, nopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:({Tidchar} | {Tstring} | {","} | {";"} | {"["} | {"]"} | {"{"} | {"}"})+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} (Tnewline | Teof)} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:({" "} | Tformat | Tcomment | Tannot)*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {(Tspace | Ttoken)*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN(N)} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} ({"E"} | {"e"}) {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} ({"P"} | {"p"}) {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ $signif(N)))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(8)} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(32)} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(64)} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(8)} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(16)} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(32)} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(64)} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(32)} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(64)} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_idx.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_idx.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_idx.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_idx.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_idx.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, c) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, EQZ_testop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, LT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, LT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, GT_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, GT_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, LE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, LE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, GE_relop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, GE_relop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, EQ_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, NE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, LT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, GT_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, LE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, GE_relop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, CLZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, CTZ_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, POPCNT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, ABS_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, NEG_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, SQRT_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, CEIL_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, FLOOR_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, TRUNC_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, NEAREST_unop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, REM_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, REM_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, AND_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, OR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, XOR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, SHL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, ROTL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, ROTR_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, ADD_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, SUB_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, MUL_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, DIV_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, MIN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, MAX_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, COPYSIGN_binop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod (Bvar(syntax symdots) | Bvar(syntax B)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod (Tvar(syntax symdots) | Tvar(syntax T)) => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/03-typefamily-removal.il b/spectec/test-middlend/specification.exp/03-typefamily-removal.il new file mode 100644 index 0000000000..9bd09adf7e --- /dev/null +++ b/spectec/test-middlend/specification.exp/03-typefamily-removal.il @@ -0,0 +1,12117 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?() + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(w) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN{N : N}(N) = + | `%`(i : nat,) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN{N : N}(N) = + | `%`(i : int,) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN(8) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN(16) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN(31) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN(33) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = 23 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = 52 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = 8 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = 11 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = $signif(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = $expon(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag{N : N}(N) = + | NORM(m : m, exp : exp) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + | SUBNORM(m : m,) {exp : exp} + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + | INF + | NAN(m : m,) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN{N : N}(N) = + | POS(fNmag(N)) + | NEG(fNmag(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN(32) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN(64) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ ((($signif(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN{N : N}(N) = uN(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN(128) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN(32), `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN(32), `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN(32), `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN(32), `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN(32), `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN(32)}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN(32)}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN(32)}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN(32)}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN(32)}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN(32)}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN(32)}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN(32)}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN(32)}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN(32)}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN(32)}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN(32)}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN(32)}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN(32)}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN(32)}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = I32_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = $vsize(vectype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = ($inv_isize(n) : addrtype <: Jnn) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ($lunpack(lanetype) : numtype <: consttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = dt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ([], []) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN(32), `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_{numtype : numtype}(numtype) = + | mk_num__0(Inn : Inn, var_x : iN($sizenn((Inn : addrtype <: numtype)))) + -- if (numtype = (Inn : addrtype <: numtype)) + | mk_num__1(Fnn : Fnn, var_x : fN($sizenn((Fnn : Fnn <: numtype)))) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(Inn : Inn, var_x : num_((Inn : addrtype <: numtype))) : iN($sizenn((Inn : addrtype <: numtype)))? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN($sizenn((Inn : addrtype <: numtype)))}(Inn, mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : num_((Inn : addrtype <: numtype))}(Inn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(Fnn : Fnn, var_x : num_((Fnn : Fnn <: numtype))) : fN($sizenn((Fnn : Fnn <: numtype)))? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN($sizenn((Fnn : Fnn <: numtype)))}(Fnn, mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : num_((Fnn : Fnn <: numtype))}(Fnn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_{Pnn : Pnn}(Pnn) = iN($psizenn(Pnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_{lanetype : lanetype}(lanetype) = + | mk_lane__0(numtype : numtype, var_x : num_(numtype)) + -- if (lanetype = (numtype : numtype <: lanetype)) + | mk_lane__1(packtype : packtype, var_x : pack_(packtype)) + -- if (lanetype = (packtype : packtype <: lanetype)) + | mk_lane__2(Jnn : Jnn, var_x : iN($lsizenn((Jnn : Jnn <: lanetype)))) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(numtype : numtype, var_x : lane_((numtype : numtype <: lanetype))) : num_(numtype)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_(numtype)}(numtype, mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : lane_((numtype : numtype <: lanetype))}(numtype, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(packtype : packtype, var_x : lane_((packtype : packtype <: lanetype))) : pack_(packtype)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_(packtype)}(packtype, mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : lane_((packtype : packtype <: lanetype))}(packtype, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(Jnn : Jnn, var_x : lane_((Jnn : Jnn <: lanetype))) : iN($lsizenn((Jnn : Jnn <: lanetype)))? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN($lsizenn((Jnn : Jnn <: lanetype)))}(Jnn, mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : lane_((Jnn : Jnn <: lanetype))}(Jnn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_{storagetype : storagetype}(storagetype) = + | mk_lit__0(numtype : numtype, var_x : num_(numtype)) + -- if (storagetype = (numtype : numtype <: storagetype)) + | mk_lit__1(vectype : vectype, var_x : vec_(vectype)) + -- if (storagetype = (vectype : vectype <: storagetype)) + | mk_lit__2(packtype : packtype, var_x : pack_(packtype)) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(numtype : numtype, var_x : lit_((numtype : numtype <: storagetype))) : num_(numtype)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_(numtype)}(numtype, mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : lit_((numtype : numtype <: storagetype))}(numtype, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(vectype : vectype, var_x : lit_((vectype : vectype <: storagetype))) : vec_(vectype)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_(vectype)}(vectype, mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : lit_((vectype : vectype <: storagetype))}(vectype, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(packtype : packtype, var_x : lit_((packtype : packtype <: storagetype))) : pack_(packtype)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_(packtype)}(packtype, mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : lit_((packtype : packtype <: storagetype))}(packtype, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn{Inn : Inn}(Inn) = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn{Fnn : Fnn}(Fnn) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_{numtype : numtype}(numtype) = + | mk_unop__0(Inn : Inn, var_x : unop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn(Fnn)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(Inn : Inn, var_x : unop_((Inn : addrtype <: numtype))) : unop_Inn(Inn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn(Inn)}(Inn, mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_((Inn : addrtype <: numtype))}(Inn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(Fnn : Fnn, var_x : unop_((Fnn : Fnn <: numtype))) : unop_Fnn(Fnn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn(Fnn)}(Fnn, mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_((Fnn : Fnn <: numtype))}(Fnn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn{Inn : Inn}(Inn) = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn{Fnn : Fnn}(Fnn) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_{numtype : numtype}(numtype) = + | mk_binop__0(Inn : Inn, var_x : binop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn(Fnn)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(Inn : Inn, var_x : binop_((Inn : addrtype <: numtype))) : binop_Inn(Inn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn(Inn)}(Inn, mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_((Inn : addrtype <: numtype))}(Inn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(Fnn : Fnn, var_x : binop_((Fnn : Fnn <: numtype))) : binop_Fnn(Fnn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn(Fnn)}(Fnn, mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_((Fnn : Fnn <: numtype))}(Fnn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn{Inn : Inn}(Inn) = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_{numtype : numtype}(numtype) = + | mk_testop__0(Inn : Inn, var_x : testop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(Inn : Inn, var_x : testop_((Inn : addrtype <: numtype))) : testop_Inn(Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn(Inn)}(Inn, mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn{Inn : Inn}(Inn) = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn{Fnn : Fnn}(Fnn) = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_{numtype : numtype}(numtype) = + | mk_relop__0(Inn : Inn, var_x : relop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn(Fnn)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(Inn : Inn, var_x : relop_((Inn : addrtype <: numtype))) : relop_Inn(Inn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn(Inn)}(Inn, mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_((Inn : addrtype <: numtype))}(Inn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(Fnn : Fnn, var_x : relop_((Fnn : Fnn <: numtype))) : relop_Fnn(Fnn)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn(Fnn)}(Fnn, mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_((Fnn : Fnn <: numtype))}(Fnn, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2{Inn_1 : Inn, Inn_2 : Inn}(Inn_1, Inn_2) = + | EXTEND(sx) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + | WRAP + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2{Inn_1 : Inn, Fnn_2 : Fnn}(Inn_1, Fnn_2) = + | CONVERT(sx) + | REINTERPRET + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2{Fnn_1 : Fnn, Inn_2 : Inn}(Fnn_1, Inn_2) = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2{Fnn_1 : Fnn, Fnn_2 : Fnn}(Fnn_1, Fnn_2) = + | PROMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + | DEMOTE + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__{numtype_1 : numtype, numtype_2 : numtype}(numtype_1, numtype_2) = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2(Inn_1, Inn_2)) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2(Inn_1, Fnn_2)) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2(Fnn_1, Inn_2)) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2(Fnn_1, Fnn_2)) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype))) : cvtop__Inn_1_Inn_2(Inn_1, Inn_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2(Inn_1, Inn_2)}(Inn_1, Inn_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype))}(Inn_1, Inn_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype))) : cvtop__Inn_1_Fnn_2(Inn_1, Fnn_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2(Inn_1, Fnn_2)}(Inn_1, Fnn_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype))}(Inn_1, Fnn_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype))) : cvtop__Fnn_1_Inn_2(Fnn_1, Inn_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2(Fnn_1, Inn_2)}(Fnn_1, Inn_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype))}(Fnn_1, Inn_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype))) : cvtop__Fnn_1_Fnn_2(Fnn_1, Fnn_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2(Fnn_1, Fnn_2)}(Fnn_1, Fnn_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype))}(Fnn_1, Fnn_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) {Jnn : Jnn} + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | ABS + | NEG + | POPCNT + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M{Fnn : Fnn, M : M}(Fnn, M) = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_{shape : shape}(shape) = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M(Jnn, M)) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M(Fnn, M)) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(Jnn : Jnn, M : M, var_x : vunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))) : vunop_Jnn_M(Jnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M(Jnn, M)}(Jnn, M, mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))}(Jnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(Fnn : Fnn, M : M, var_x : vunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))) : vunop_Fnn_M(Fnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M(Fnn, M)}(Fnn, M, mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))}(Fnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | ADD + | SUB + | ADD_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | SUB_SAT(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | MUL + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + | AVGRU + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + | Q15MULR_SATS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | RELAXED_Q15MULRS + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + | MIN(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + | MAX(sx) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M{Fnn : Fnn, M : M}(Fnn, M) = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_{shape : shape}(shape) = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M(Jnn, M)) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M(Fnn, M)) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))) : vbinop_Jnn_M(Jnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M(Jnn, M)}(Jnn, M, mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))}(Jnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))) : vbinop_Fnn_M(Fnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M(Fnn, M)}(Fnn, M, mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))}(Fnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M{Fnn : Fnn, M : M}(Fnn, M) = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_{shape : shape}(shape) = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M(Jnn, M)) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M(Fnn, M)) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(Jnn : Jnn, M : M, var_x : vternop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))) : vternop_Jnn_M(Jnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M(Jnn, M)}(Jnn, M, mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))}(Jnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(Fnn : Fnn, M : M, var_x : vternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))) : vternop_Fnn_M(Fnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M(Fnn, M)}(Fnn, M, mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))}(Fnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_{shape : shape}(shape) = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M(Jnn, M)) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))) : vtestop_Jnn_M(Jnn, M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M(Jnn, M)}(Jnn, M, mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | EQ + | NE + | LT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GT(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | LE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + | GE(sx : sx,) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M{Fnn : Fnn, M : M}(Fnn, M) = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_{shape : shape}(shape) = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M(Jnn, M)) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M(Fnn, M)) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))) : vrelop_Jnn_M(Jnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M(Jnn, M)}(Jnn, M, mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M))}(Jnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))) : vrelop_Fnn_M(Fnn, M)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M(Fnn, M)}(Fnn, M, mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M))}(Fnn, M, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M{Jnn : Jnn, M : M}(Jnn, M) = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_{ishape : ishape}(ishape) = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M(Jnn, M)) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),))) : vshiftop_Jnn_M(Jnn, M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M(Jnn, M)}(Jnn, M, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M{M : M}(M) = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_{bshape : bshape}(bshape) = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M(M)) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(M : M, var_x : vswizzlop_(`%`_bshape(`%X%`_shape(I8_lanetype, M),))) : vswizzlop_M(M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M(M)}(M, mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(Jnn_1, M_1, Jnn_2, M_2) = + | EXTADD_PAIRWISE(sx) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__{ishape_1 : ishape, ishape_2 : ishape}(ishape_1, ishape_2) = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),))) : vextunop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)}(Jnn_1, M_1, Jnn_2, M_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(Jnn_1, M_1, Jnn_2, M_2) = + | EXTMUL(half : half, sx : sx) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + | DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + | RELAXED_DOTS + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__{ishape_1 : ishape, ishape_2 : ishape}(ishape_1, ishape_2) = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),))) : vextbinop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)}(Jnn_1, M_1, Jnn_2, M_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(Jnn_1, M_1, Jnn_2, M_2) = + | RELAXED_DOT_ADDS + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__{ishape_1 : ishape, ishape_2 : ishape}(ishape_1, ishape_2) = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),))) : vextternop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)}(Jnn_1, M_1, Jnn_2, M_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(Jnn_1, M_1, Jnn_2, M_2) = + | EXTEND(half : half, sx : sx) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(Jnn_1, M_1, Fnn_2, M_2) = + | CONVERT(`half?` : half?, sx : sx) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}(Fnn_1, M_1, Jnn_2, M_2) = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}(Fnn_1, M_1, Fnn_2, M_2) = + | DEMOTE(zero) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + | PROMOTELOW + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__{shape_1 : shape, shape_2 : shape}(shape_1, shape_2) = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2(Jnn_1, M_1, Fnn_2, M_2)) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2(Fnn_1, M_1, Jnn_2, M_2)) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2(Fnn_1, M_1, Fnn_2, M_2)) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2))) : vcvtop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2(Jnn_1, M_1, Jnn_2, M_2)}(Jnn_1, M_1, Jnn_2, M_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2))}(Jnn_1, M_1, Jnn_2, M_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2))) : vcvtop__Jnn_1_M_1_Fnn_2_M_2(Jnn_1, M_1, Fnn_2, M_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2(Jnn_1, M_1, Fnn_2, M_2)}(Jnn_1, M_1, Fnn_2, M_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2))}(Jnn_1, M_1, Fnn_2, M_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2))) : vcvtop__Fnn_1_M_1_Jnn_2_M_2(Fnn_1, M_1, Jnn_2, M_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2(Fnn_1, M_1, Jnn_2, M_2)}(Fnn_1, M_1, Jnn_2, M_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2))}(Fnn_1, M_1, Jnn_2, M_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2))) : vcvtop__Fnn_1_M_1_Fnn_2_M_2(Fnn_1, M_1, Fnn_2, M_2)? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2(Fnn_1, M_1, Fnn_2, M_2)}(Fnn_1, M_1, Fnn_2, M_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2))}(Fnn_1, M_1, Fnn_2, M_2, var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn{Inn : Inn}(Inn) = + | `%_%`(sz : sz, sx : sx) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_{numtype : numtype}(numtype) = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(Inn : Inn, var_x : loadop_((Inn : addrtype <: numtype))) : loadop_Inn(Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn(Inn)}(Inn, mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn{Inn : Inn}(Inn) = + | `%`(sz : sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_{numtype : numtype}(numtype) = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn(Inn)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(Inn : Inn, var_x : storeop_((Inn : addrtype <: numtype))) : storeop_Inn(Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn(Inn)}(Inn, mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_{vectype : vectype}(vectype) = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + -- if (((sz!`%`_sz.0 * M!`%`_dim.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + | SPLAT(sz) + | ZERO(sz : sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_(numtype)?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_(numtype)?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_(vectype)?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_(numtype)) + | UNOP(numtype : numtype, unop_(numtype)) + | BINOP(numtype : numtype, binop_(numtype)) + | TESTOP(numtype : numtype, testop_(numtype)) + | RELOP(numtype : numtype, relop_(numtype)) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__(numtype_2, numtype_1)) + | VCONST(vectype : vectype, vec_(vectype)) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_(shape)) + | VBINOP(shape : shape, vbinop_(shape)) + | VTERNOP(shape : shape, vternop_(shape)) + | VTESTOP(shape : shape, vtestop_(shape)) + | VRELOP(shape : shape, vrelop_(shape)) + | VSHIFTOP(ishape : ishape, vshiftop_(ishape)) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_(bshape)) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__(ishape_2, ishape_1)) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__(ishape_2, ishape_1)) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__(ishape_2, ishape_1)) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__(shape_2, shape_1)) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_((consttype : consttype <: storagetype))) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_(numtype)}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN(128)}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN(32)}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN(32), labelidx : uN(32)}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN(32), labelidx : uN(32)}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN(32)}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN(32)}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN(32), `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN(32)}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN(32)}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN(32)}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN(32)}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN(32)}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN(32), reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN(32), reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN(32)}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN(32), typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN(32)}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN(32), typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN(32)}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN(128)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN(8)}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN(8)}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN(32)}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN(32)}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN(32)}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN(32), u32 : uN(32)}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN(32), u32 : uN(32)}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN(32)}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN(32)}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN(32), u32 : uN(32)}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN(32), dataidx : uN(32)}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN(32), elemidx : uN(32)}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN(32)}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN(32)}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN(32)}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN(32), typeidx_2 : uN(32)}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN(32), dataidx : uN(32)}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN(32), elemidx : uN(32)}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN(32)}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN(32)}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN(32)}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN(32)}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN(32)}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN(32)}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN(32)}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN(32)}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN(32)}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN(32)}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN(32), tableidx_2 : uN(32)}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN(32), elemidx : uN(32)}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN(32)}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : uN(32), memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : uN(32), memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : uN(32), memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN(32), memarg : memarg, laneidx : uN(8)}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN(32), memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN(32), memarg : memarg, laneidx : uN(8)}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN(32)}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN(32)}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN(32)}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN(32), memidx_2 : uN(32)}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN(32), dataidx : uN(32)}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN(32)}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN(32), `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN(32), expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN(32), expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN(32)}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = C + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN(32), `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_uN.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN(32)}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_uN.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(NULL_null?{}, heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_uN.0] = dt) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype), heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(NULL_null?{}, ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_uN.0] = lct))*{lct <- `lct*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], comptype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_uN.0 < x_0!`%`_uN.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_uN.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),))) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(MUT_mut?{}, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_uN.0]) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,)))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?() + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_uN.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(NULL_null?{}, ht)],)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- if (x <- C.REFS_context) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(?(MUT_mut), zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_uN.0], rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_uN.0] : reftype <: storagetype), zt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(MUT_mut), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_uN.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_uN.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_uN.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_uN.0] = rt) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_uN.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_uN.0] = `%%PAGE`_memtype(at_2, lim_2)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_uN.0] = OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_dim.0)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_(V128_Vnn)}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_uN.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) = ?()) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_(nt)}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_(vt)}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(), t)) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_((Inn : addrtype <: numtype))}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_uN.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(MUT_mut?{}, t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_uN.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_uN.0] = jt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = gt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_uN.0] = mt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_uN.0] = tt) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN(N)) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN(N)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_(numtype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_(vectype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_(storagetype)) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_((Cnn : Cnn <: storagetype))) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_(numtype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_(vectype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_(storagetype) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_((Cnn : Cnn <: storagetype)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN(N)}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN(N)}(N, i_1) = (if ($signed_(N, i_1!`%`_uN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN(N)}(N, K, U_sx, i) = `%`_iN((i!`%`_uN.0 \ (2 ^ K)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN(N)}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN(N)}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN(N)}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN(N), i_2 : uN(N), j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_uN.0)) /\ (j_2 = $signed_(N, i_2!`%`_uN.0))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 <= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 > i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 >= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 < i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 = 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN(N)}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 =/= 0)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN(N), i_2 : uN(N)}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN(N), fN : fN(N)) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN(N)) : iN(N')? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN(N)) : fN(N')* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN(N)) : fN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN(N)) : iN(N') + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_(numtype_1)) : num_(numtype_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_(numtype)}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN(32)}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_(($cunpack(storagetype) : consttype <: storagetype))) : lit_(storagetype) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN(32)}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_(numtype)}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN($psize(packtype))}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_(storagetype)) : lit_(($cunpack(storagetype) : consttype <: storagetype)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_((consttype : consttype <: storagetype))}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN($psize(packtype))}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : num_(numtype)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_(numtype), num_ : num_(numtype), num_ : num_(numtype)) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN($size((Inn : addrtype <: numtype))), i_2 : uN($size((Inn : addrtype <: numtype)))}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN($size((Fnn : Fnn <: numtype))), f_2 : fN($size((Fnn : Fnn <: numtype)))}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__(numtype_1, numtype_2), num_ : num_(numtype_1)) : num_(numtype_2)* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN($size((Inn_1 : addrtype <: numtype)))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN($size((Inn_1 : addrtype <: numtype)))}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN($size((Fnn_1 : Fnn <: numtype)))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN($size((Fnn_1 : Fnn <: numtype)))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN($size((Inn_1 : addrtype <: numtype)))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN($size((Fnn_1 : Fnn <: numtype)))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN($size((Fnn_1 : Fnn <: numtype)))}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN($size((Inn_1 : addrtype <: numtype)))}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN($size((Fnn_1 : Fnn <: numtype)))}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_(V128_Vnn)) : lane_($lanetype(shape))* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_($lanetype(shape))*) : vec_(V128_Vnn) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2)) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN(N)*, i : uN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else `%`_iN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN(N)*, iN : iN(N)) : iN(N) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN(N)*, i : uN(N)}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else (if ($signed_(N, i!`%`_uN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN(N), `%`_iN(0,), c*{c <- `c*`}[(i!`%`_uN.0 \ |c*{c <- `c*`}|)]))) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN(N)) : iN(N), v_1 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1)))*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN(N)) : fN(N)*, v_1 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0((Fnn : Fnn <: numtype), c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_1)))))}*{c_1 <- `c_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N)*, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(Jnn, c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_((Jnn : Jnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0((Fnn : Fnn <: numtype), c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_1)))), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN(N), iN : iN(N), iN : iN(N)) : iN(N)*, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(Jnn, c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_((Jnn : Jnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Jnn : Jnn <: lanetype)), mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)), !($proj_lane__2(Jnn, c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN(N), fN : fN(N), fN : fN(N)) : fN(N)*, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0((Fnn : Fnn <: numtype), c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_((Fnn : Fnn <: lanetype))**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_((Fnn : Fnn <: lanetype)), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_1)))), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_2)))), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN(N), iN : iN(N)) : u32, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : u32, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn, c_1)), !($proj_lane__2(Jnn, c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN(N), fN : fN(N)) : u32, v_1 : uN(128), v_2 : uN(128), Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN($sizenn((Fnn : Fnn <: numtype)))*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_1)))), !($proj_num__1(Fnn, !($proj_lane__0((Fnn : Fnn <: numtype), c_2)))))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN(N), iN : iN(N)) : iN(N), v_1 : uN(128), i : uN(32)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN(N), iN : iN(N)) : iN(N), sx : sx, v_1 : uN(128), i : uN(32)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn, c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN(128), c : uN(32)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(Jnn, c_1)), `%`_iN(0,))!`%`_uN.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_dim.0 : nat <:> int)) : int <:> nat){}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN(N)*, iN : iN(N)) : iN(N), v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN($lsizenn((Jnn : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(Jnn, c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(Jnn, c_2)))*{c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_uN.0]*{i <- `i*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN(128)}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN(128), v_2 : uN(128)}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN(128), v_2 : uN(128)}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN(128), v_2 : uN(128)}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN(128), v_2 : uN(128)}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_(vectype), vec_ : vec_(vectype), vec_ : vec_(vectype)) : vec_(vectype)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_(shape), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128), v_3 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_(shape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), lane_ : lane_($lanetype(shape_1))) : lane_($lanetype(shape_2))* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN($lsize((Jnn_1 : Jnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN($lsize((Jnn_1 : Jnn <: lanetype)))}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN($size((Fnn_1 : Fnn <: numtype)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN($size((Fnn_1 : Fnn <: numtype)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN($lsizenn2((Inn_2 : addrtype <: lanetype)))?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN($size((Fnn_1 : Fnn <: numtype)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN($size((Fnn_1 : Fnn <: numtype)))}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN($lsizenn2((Fnn_2 : Fnn <: lanetype)))*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__(shape_1, shape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M)), v_1 : uN(128), v : uN(128)}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : uN(128), v : uN(128), half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_dim.0) : M_2!`%`_dim.0] + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2)), v_1 : uN(128), v : uN(128)}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape(Lnn_1, M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_(Lnn_2)**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_(Lnn_2), $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_dim.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN(128), i : uN(32)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN(128), i : uN(32)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN(128)}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_(bshape), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN(128), v_2 : uN(128)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN(128), v_2 : uN(128)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN(128), v_2 : uN(128)}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn_1, c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN($lsize((Jnn_2 : Jnn <: lanetype)))*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn_1, c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_(V128_Vnn)} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN(N)*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_uN.0*{i <- `i*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN(N)*) : iN(N)*, sx : sx, v_1 : uN(128)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(Jnn_1, c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN(128)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN(N)*, iN(N)*) : iN(N)*, sx_1 : sx, sx_2 : sx, i : uN(8), k : uN(8), v_1 : uN(128), v_2 : uN(128)}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c'_1*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(Jnn_1, c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(Jnn_1, c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN(N)*, `i_2*` : iN(N)*, `j_1*` : iN(N)*, `j_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN(N), [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN(N)*, iN(N)*) : iN(N)* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN(N)*, `i_2*` : iN(N)*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN(N)*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN(128), v_2 : uN(128)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_dim.0),), `%`_laneidx(M_2!`%`_dim.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN(128), v_2 : uN(128)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN(128), v_2 : uN(128)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__(ishape_1, ishape_2), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN(128), c_2 : uN(128), c_3 : uN(128), c : uN(128)}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_($lanetype(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)))*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN(N)*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(Jnn_1, ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN(N)*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(Jnn_1, ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN(N)*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN($lsizenn2((Jnn_2 : Jnn <: lanetype)))*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_(V128_Vnn)} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_(numtype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_(vectype)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_(numtype)) + | VCONST(vectype : vectype, vec_(vectype)) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN($psizenn(packtype))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = (val : val <: fieldval) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN(32)}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN($psize(packtype))}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN(32)}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN(32)}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN(32)}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN(32)}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN(32)}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN(32)}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN(32)}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN(32)}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN(32)}(z, x) = $fof(z).LOCALS_frame[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN(32), v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN(32), v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN(32), i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN(32), ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN(32), i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN(32), mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN(32), `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN(32), `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN(64)}(tableinst, n, r) = tableinst' + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_uN.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if ((i'!`%`_uN.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN(64)}(meminst, n) = meminst' + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_uN.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if (i'!`%`_uN.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_(nt)}: + `%|-%:%`(s, CONST_num(nt, c), nt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_(vt)}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN($psizenn(pt))}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_(I32_numtype), `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_(I32_numtype), bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_uN.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_uN.0 > 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 =/= 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_(I32_numtype), l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[!($proj_num__0(I32_Inn, i))!`%`_uN.0])]) + -- if (!($proj_num__0(I32_Inn, i))!`%`_uN.0 < |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_(I32_numtype), `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (!($proj_num__0(I32_Inn, i))!`%`_uN.0 >= |l*{l <- `l*`}|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_(I32_numtype)}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(I32_Inn, i))))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_(nt), unop : unop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_(nt), unop : unop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt), c : num_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), binop : binop_(nt)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_(nt), testop : testop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(I32_Inn, c)) = $testop_(nt, testop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_(nt), c_2 : num_(nt), relop : relop_(nt), c : num_(I32_numtype)}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(I32_Inn, c)) = $relop_(nt, relop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2), c : num_(nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_(nt_1), nt_2 : numtype, cvtop : cvtop__(nt_1, nt_2)}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_(V128_Vnn), vvunop : vvunop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), vvbinop : vvbinop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), vvternop : vvternop, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_(V128_Vnn), c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(I32_Inn, c)) = $inez_($vsize(V128_vectype), c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_(V128_Vnn), sh : shape, vunop : vunop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vbinop : vbinop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh : shape, vternop : vternop_(sh)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_(V128_Vnn), Jnn : Jnn, M : M, c : num_(I32_numtype), `i*` : lane_($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)))*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (!($proj_num__0(I32_Inn, c))!`%`_uN.0 = $prod($inez_($jsizenn(Jnn), !($proj_lane__2(Jnn, i)))!`%`_uN.0*{i <- `i*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : shape, vrelop : vrelop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_(V128_Vnn), i : num_(I32_numtype), sh : ishape, vshiftop : vshiftop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(I32_Inn, i)))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_(V128_Vnn), sh : ishape, c : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(I32_Inn, c)) = $vbitmaskop_(sh, c_1)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, swizzlop : vswizzlop_(sh), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh : bshape, `i*` : laneidx*, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_dim.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_(V128_Vnn), nt : numtype, M : M, i : laneidx, c_2 : num_(nt)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_uN.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_(V128_Vnn), pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_(I32_numtype)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(I32_Inn, c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1(pt, $lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_uN.0])))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_(V128_Vnn), Lnn : Lnn, c_2 : num_($lunpack(Lnn)), M : M, i : laneidx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_uN.0] = $lpacknum_(Lnn, c_2)])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), c_3 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_(V128_Vnn), c_2 : vec_(V128_Vnn), sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_(V128_Vnn), sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__(sh_1, sh_2), c : vec_(V128_Vnn)}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN(32), `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (!($proj_num__0(at, i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[!($proj_num__0(at, i))!`%`_uN.0] : ref <: instr)]) + -- if (!($proj_num__0(at, i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(at, i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(at, i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(at_1, i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(at_2, i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(at_1, i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(at_2, i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (!($proj_num__0(at_1, i_1))!`%`_uN.0 <= !($proj_num__0(at_2, i_2))!`%`_uN.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(at_1, i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(at_2, i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[!($proj_num__0(I32_Inn, j))!`%`_uN.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(at, i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, x : idx, ao : memarg, c : num_(nt)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN(n)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), x : idx, ao : memarg, c : vec_(V128_Vnn)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((K * M!`%`_dim.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_(V128_Vnn), `j*` : iN(K)*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))^M!`%`_dim.0{})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), N : N, x : idx, ao : memarg, c : vec_(V128_Vnn), j : iN(N)}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c_1 : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, c : vec_(V128_Vnn), k : iN(N), Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_uN.0] = mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(at, i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(at, i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(at_1, i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(at_2, i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(at_1, i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(at_2, i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (!($proj_num__0(at_1, i_1))!`%`_uN.0 <= !($proj_num__0(at_2, i_2))!`%`_uN.0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_((at_1 : addrtype <: numtype)), at_2 : addrtype, i_2 : num_((at_2 : addrtype <: numtype)), at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(at_1, i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(at_2, i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(I32_Inn, j))!`%`_uN.0]!`%`_byte.0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(at, i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0])]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ($default_($unpack(zt)) = ?(val)))*{val <- `val*`, zt <- `zt*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [($unpackfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_uN.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) = ?(val)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[!($proj_num__0(I32_Inn, i))!`%`_uN.0 : n]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_(zt)*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const($cunpack(zt), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[!($proj_num__0(I32_Inn, i))!`%`_uN.0 : ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (!($proj_num__0(I32_Inn, i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_(I32_numtype), `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[!($proj_num__0(I32_Inn, i))!`%`_uN.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_(I32_numtype), val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- otherwise + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_(I32_numtype), ref : ref, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_(I32_numtype), i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, i_1))!`%`_uN.0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, i_2))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(I32_Inn, i_1))!`%`_uN.0 <= !($proj_num__0(I32_Inn, i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_(I32_numtype), a_2 : addr, i_2 : num_(I32_numtype), n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(I32_Inn, i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(I32_Inn, i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[!($proj_num__0(I32_Inn, j))!`%`_uN.0]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_(I32_numtype), j : num_(I32_numtype), n : n, x : idx, y : idx, zt : storagetype, c : lit_(zt), `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const($cunpack(zt), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(I32_Inn, j))!`%`_uN.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[!($proj_num__0(I32_Inn, j))!`%`_uN.0 : ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`($as_deftype($tag(z, x).TYPE_taginst), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(at, i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, !($proj_num__0(at, i))!`%`_uN.0, ref), [])) + -- if (!($proj_num__0(at, i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = $growtable($table(z, x), n, ref)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), nt : numtype, c : num_(nt), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), Inn : Inn, c : num_((Inn : addrtype <: numtype)), n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(Inn, c))))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_((at : addrtype <: numtype)), c : vec_(V128_Vnn), N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(at, i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN(!($proj_lane__2(Jnn, $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = $growmem($mem(z, x), n)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}}) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_uN.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val)), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(I32_Inn, i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_(I32_numtype), val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, !($proj_num__0(I32_Inn, i))!`%`_uN.0, $packfield_(zt, val)), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN(32)}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_uN.0 = |deftype'*{deftype' <- `deftype'*`}|) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN(64), `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN(64), `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN(32)}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN(32)}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN(32)}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN(32)}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])} + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN(32)}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_uN.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN(32), n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN(32), n : nat, `b*` : byte*, y : uN(32), `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN(32), rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN(32), rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN(32), rt : reftype, n : nat, `e*` : expr*, y : uN(32), `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag(N) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_uN.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, $with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(mut), t)) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_(F64_numtype), q_4 : num_(F64_numtype), q_3 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_(F64_numtype), q_5 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_(F64_numtype)}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat)), n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN(N)} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(32)} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN(64)} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN(33)} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(32)} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN(64)} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(32)} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN(64)} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_sN.0 : int <:> nat),)) + -- if (i!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_uN.0,):Bbyte => `%`_laneidx(l!`%`_uN.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_uN.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(NULL_null?{}, ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => $opt_(syntax start, startopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => $opt_(syntax u32, nopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN(N)} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ $signif(N)))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN(N) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag(N)} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(8)} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(32)} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN(64)} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(8)} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(16)} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(32)} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN(64)} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(32)} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN(64)} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_uN.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_uN.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_uN.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/04-remove-indexed-types.il b/spectec/test-middlend/specification.exp/04-remove-indexed-types.il new file mode 100644 index 0000000000..581a9964b6 --- /dev/null +++ b/spectec/test-middlend/specification.exp/04-remove-indexed-types.il @@ -0,0 +1,16458 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?() + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(w) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = 23 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = 52 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = 8 + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = 11 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = $signif(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = $expon(N) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ ((($signif(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + -- wf_byte: `%`(`%`_byte(ch!`%`_char.0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + -- (wf_uN: `%%`(64, u64))?{u64 <- `u64?`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = I32_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = $vsize(vectype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = I32_Inn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = I64_Inn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = I8_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = I16_Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = ($inv_isize(n) : addrtype <: Jnn) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = F32_Fnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = F64_Fnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_consttype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ($lunpack(lanetype) : numtype <: consttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = dt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ([], []) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + -- wf_typevar: `%`(_IDX_typevar(x),) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if (((sz!`%`_sz.0 * M!`%`_dim.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = C + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_uN.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_uN.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_uN.0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_uN.0 < x_0!`%`_uN.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_uN.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,)))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(VCONST_val(Vnn, `%`_vec_(0,))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(`REF.NULL_ADDR`_val) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?() + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_uN.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_uN.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_uN.0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_uN.0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_uN.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_uN.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_uN.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_uN.0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_uN.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_uN.0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_dim.0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_uN.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_uN.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_uN.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_uN.0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_uN.0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_uN.0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, i_1!`%`_uN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN((i!`%`_uN.0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN((i!`%`_uN.0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_uN.0)) /\ (j_2 = $signed_(N, i_2!`%`_uN.0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 <= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 > i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 >= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 < i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`(($cunpack((packtype : packtype <: storagetype)) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else (if ($signed_(N, i!`%`_uN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[(i!`%`_uN.0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_dim.0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_uN.0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_dim.0) : M_2!`%`_dim.0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_dim.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_uN.0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_dim.0),), `%`_laneidx(M_2!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, M_2!`%`_dim.0),)) + -- wf_uN: `%%`(8, `%`_uN(M_2!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = (val : val <: fieldval) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = val + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = tableinst' + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_uN.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if ((i'!`%`_uN.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = meminst' + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_uN.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if (i'!`%`_uN.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_uN.0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_uN.0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0])]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (!($proj_num__0(c))!`%`_uN.0 = $prod($inez_($jsizenn(Jnn), !($proj_lane__2(i)))!`%`_uN.0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_dim.0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_uN.0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_uN.0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_uN.0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[!($proj_num__0(i))!`%`_uN.0] : ref <: instr)]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((K * M!`%`_dim.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))^M!`%`_dim.0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_uN.0] = mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0])]) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ($default_($unpack(zt)) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [($unpackfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_uN.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[!($proj_num__0(i))!`%`_uN.0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(i))!`%`_uN.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const($cunpack(zt), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[!($proj_num__0(i))!`%`_uN.0 : ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[!($proj_num__0(i))!`%`_uN.0]) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * $zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const($cunpack(zt), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0 : ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + ((($zsize(zt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ $default_(t)*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`($as_deftype($tag(z, x).TYPE_taginst), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), [])) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = $growtable($table(z, x), n, ref)) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = $growmem($mem(z, x), n)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_uN.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val)), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, i!`%`_uN.0, $packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val)), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS $packfield_(zt, val)^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, $packfield_(zt, val)), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, $packfield_(zt, val)), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_uN.0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_uN.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_uN.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, $with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_sN.0 : int <:> nat),)) + -- if (i!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_uN.0,):Bbyte => `%`_laneidx(l!`%`_uN.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_uN.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => $opt_(syntax start, startopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => $opt_(syntax u32, nopt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ $signif(N)))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_uN.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_uN.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_uN.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/05-totalize.il b/spectec/test-middlend/specification.exp/05-totalize.il new file mode 100644 index 0000000000..17384de43e --- /dev/null +++ b/spectec/test-middlend/specification.exp/05-totalize.il @@ -0,0 +1,16500 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + -- wf_byte: `%`(`%`_byte(ch!`%`_char.0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + -- (wf_uN: `%%`(64, u64))?{u64 <- `u64?`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = ?($size(numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = ?($vsize(vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = ?($psize(packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = ?(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = ?(vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = ?(consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ?(($lunpack(lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = ?(dt) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = !($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = (!($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if (((sz!`%`_sz.0 * M!`%`_dim.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_uN.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_uN.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_uN.0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_uN.0 < x_0!`%`_uN.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_uN.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(?(VCONST_val(Vnn, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_uN.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_uN.0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_uN.0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_uN.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_uN.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_uN.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_uN.0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_uN.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_uN.0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_dim.0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_uN.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_uN.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_uN.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_uN.0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_uN.0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_uN.0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, i_1!`%`_uN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN((i!`%`_uN.0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN((i!`%`_uN.0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_uN.0)) /\ (j_2 = $signed_(N, i_2!`%`_uN.0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 <= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 > i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 >= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 < i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else (if ($signed_(N, i!`%`_uN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[(i!`%`_uN.0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_dim.0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_uN.0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_dim.0) : M_2!`%`_dim.0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_dim.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_uN.0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_dim.0),), `%`_laneidx(M_2!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, M_2!`%`_dim.0),)) + -- wf_uN: `%%`(8, `%`_uN(M_2!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = ?(val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_uN.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if ((i'!`%`_uN.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_uN.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if (i'!`%`_uN.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_uN.0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_uN.0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0])]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- otherwise + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- otherwise + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- otherwise + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- otherwise + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (!($proj_num__0(c))!`%`_uN.0 = $prod($inez_($jsizenn(Jnn), !($proj_lane__2(i)))!`%`_uN.0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_dim.0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_uN.0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_uN.0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_uN.0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[!($proj_num__0(i))!`%`_uN.0] : ref <: instr)]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((K * M!`%`_dim.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))^M!`%`_dim.0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_uN.0] = mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0])]) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- otherwise + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[!($proj_num__0(i))!`%`_uN.0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(i))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[!($proj_num__0(i))!`%`_uN.0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[!($proj_num__0(i))!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- otherwise + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- otherwise + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- otherwise + -- if (ref = $elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- otherwise + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- otherwise + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), [])) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_uN.0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_uN.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_uN.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_sN.0 : int <:> nat),)) + -- if (i!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_uN.0,):Bbyte => `%`_laneidx(l!`%`_uN.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_uN.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_uN.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_uN.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_uN.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/06-else.il b/spectec/test-middlend/specification.exp/06-else.il new file mode 100644 index 0000000000..292f3b8f0a --- /dev/null +++ b/spectec/test-middlend/specification.exp/06-else.il @@ -0,0 +1,17032 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + -- wf_byte: `%`(`%`_byte(ch!`%`_char.0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + -- (wf_uN: `%%`(64, u64))?{u64 <- `u64?`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = ?($size(numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = ?($vsize(vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = ?($psize(packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = ?(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = ?(vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = ?(consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ?(($lunpack(lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = ?(dt) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = !($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = (!($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if (((sz!`%`_sz.0 * M!`%`_dim.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_uN.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_uN.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_uN.0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_uN.0 < x_0!`%`_uN.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_uN.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(?(VCONST_val(Vnn, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_uN.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_uN.0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_uN.0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_uN.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_uN.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_uN.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_uN.0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_uN.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_uN.0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_dim.0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_uN.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_uN.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_uN.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_uN.0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_uN.0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_uN.0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, i_1!`%`_uN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN((i!`%`_uN.0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN((i!`%`_uN.0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_uN.0)) /\ (j_2 = $signed_(N, i_2!`%`_uN.0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 <= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 > i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 >= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 < i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else (if ($signed_(N, i!`%`_uN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[(i!`%`_uN.0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_dim.0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_uN.0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_dim.0) : M_2!`%`_dim.0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_dim.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_uN.0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_dim.0),), `%`_laneidx(M_2!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, M_2!`%`_dim.0),)) + -- wf_uN: `%%`(8, `%`_uN(M_2!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = ?(val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_uN.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if ((i'!`%`_uN.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_uN.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if (i'!`%`_uN.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_br_on_null-addr`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null_0`{val : val, l : labelidx}: + `%`([(val : val <: instr) BR_ON_NULL_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_br_on_non_null-addr`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null_0`{val : val, l : labelidx}: + `%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_ref.is_null-false`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true_0`{ref : ref}: + `%`([(ref : ref <: instr) `REF.IS_NULL`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_ref.as_non_null-addr`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null_0`{ref : ref}: + `%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_ref.eq-false`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true_0`{ref_1 : ref, ref_2 : ref}: + `%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_pure_before_extern.convert_any-addr`: `%`(instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null_0`{ref : ref}: + `%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_uN.0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_uN.0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0])]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- ~ `Step_pure_before_br_on_null-addr`: `%`([(val : val <: instr) BR_ON_NULL_instr(l)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- ~ `Step_pure_before_br_on_non_null-addr`: `%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_pure_before_ref.is_null-false`: `%`([(ref : ref <: instr) `REF.IS_NULL`_instr]) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- ~ `Step_pure_before_ref.as_non_null-addr`: `%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr]) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_pure_before_ref.eq-false`: `%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr]) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- ~ `Step_pure_before_extern.convert_any-addr`: `%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr]) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (!($proj_num__0(c))!`%`_uN.0 = $prod($inez_($jsizenn(Jnn), !($proj_lane__2(i)))!`%`_uN.0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_dim.0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_uN.0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_uN.0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_uN.0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- ~ `Step_read_before_table.fill-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_1`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- ~ `Step_read_before_table.init-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_1`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- ~ `Step_read_before_memory.fill-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_1`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- ~ `Step_read_before_memory.init-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_1`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- ~ `Step_read_before_array.fill-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_1`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-succ`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- ~ `Step_read_before_array.init_elem-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[!($proj_num__0(i))!`%`_uN.0] : ref <: instr)]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- ~ `Step_read_before_table.fill-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- ~ `Step_read_before_table.fill-succ`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- ~ `Step_read_before_table.init-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- ~ `Step_read_before_table.init-succ`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((K * M!`%`_dim.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))^M!`%`_dim.0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_uN.0] = mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- ~ `Step_read_before_memory.fill-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- ~ `Step_read_before_memory.fill-succ`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_memory.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_memory.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- ~ `Step_read_before_memory.init-zero`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- ~ `Step_read_before_memory.init-succ`: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0])]) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[!($proj_num__0(i))!`%`_uN.0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(i))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[!($proj_num__0(i))!`%`_uN.0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[!($proj_num__0(i))!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- ~ `Step_read_before_array.fill-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- ~ `Step_read_before_array.fill-succ`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_elem-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- ~ `Step_read_before_array.init_elem-succ`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if (ref = $elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), [])) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_uN.0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_uN.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_uN.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_sN.0 : int <:> nat),)) + -- if (i!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_uN.0,):Bbyte => `%`_laneidx(l!`%`_uN.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_uN.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_uN.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_uN.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_uN.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/07-else-simplification.il b/spectec/test-middlend/specification.exp/07-else-simplification.il new file mode 100644 index 0000000000..e774100c65 --- /dev/null +++ b/spectec/test-middlend/specification.exp/07-else-simplification.il @@ -0,0 +1,16848 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = (((b!`%`_byte.0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= b!`%`_byte.0) /\ (b!`%`_byte.0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if (ch!`%`_char.0 < 128) + -- let{b : byte} b = `%`_byte(ch!`%`_char.0,) + -- wf_byte: `%`(`%`_byte(ch!`%`_char.0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 2048)) + -- if (ch!`%`_char.0 = (((2 ^ 6) * (((b_1!`%`_byte.0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 55296)) \/ ((57344 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 65536))) + -- if (ch!`%`_char.0 = ((((2 ^ 12) * (((b_1!`%`_byte.0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= ch!`%`_char.0) /\ (ch!`%`_char.0 < 1114112)) + -- if (ch!`%`_char.0 = (((((2 ^ 18) * (((b_1!`%`_byte.0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + -- (wf_uN: `%%`(64, u64))?{u64 <- `u64?`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = ?($size(numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = ?($vsize(vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = ?($psize(packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = ?(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = ?(vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = ?(consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ?(($lunpack(lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = ?(dt) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = !($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = (!($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * dim!`%`_dim.0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if (((sz!`%`_sz.0 * M!`%`_dim.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if (sz!`%`_sz.0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim(bshape!`%`_bshape.0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype(ishape_2!`%`_ishape.0)) = (2 * $lsize($lanetype(ishape_1!`%`_ishape.0)))) /\ ((2 * $lsize($lanetype(ishape_1!`%`_ishape.0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN((((labelidx!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[x_1!`%`_uN.0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_uN.0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[typeidx!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_uN.0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[x!`%`_uN.0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if (x!`%`_uN.0 < x_0!`%`_uN.0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[x!`%`_uN.0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx((x!`%`_uN.0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[l!`%`_uN.0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(?(VCONST_val(Vnn, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l!`%`_uN.0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[l'!`%`_uN.0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if (C.LABELS_context[l!`%`_uN.0]!`%`_list.0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_uN.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[y!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[x!`%`_uN.0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i!`%`_uN.0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_uN.0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_uN.0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[x!`%`_uN.0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x_1!`%`_uN.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[x_2!`%`_uN.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[y!`%`_uN.0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[x!`%`_uN.0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x_1!`%`_uN.0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[x_2!`%`_uN.0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[y!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[x!`%`_uN.0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_dim.0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if ((i!`%`_uN.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if (i!`%`_uN.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (i!`%`_uN.0 < $dim(sh)!`%`_dim.0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if (x!`%`_uN.0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[x!`%`_uN.0]) + -- Expand: `%~~%`(C.TYPES_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[x!`%`_uN.0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[x!`%`_uN.0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[x!`%`_uN.0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[x!`%`_uN.0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[x!`%`_uN.0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[x!`%`_uN.0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[x!`%`_uN.0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[x!`%`_uN.0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][i!`%`_relaxed2.0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][i!`%`_relaxed4.0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - (i_1!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, i_1!`%`_uN.0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN((i!`%`_uN.0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN((i!`%`_uN.0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, (i!`%`_uN.0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 + i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + i_1!`%`_uN.0) : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN(((i_1!`%`_uN.0 * i_2!`%`_uN.0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, i_1!`%`_uN.0) : int <:> rat) / ($signed_(N, i_2!`%`_uN.0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN((((i_1!`%`_uN.0 : nat <:> int) - ((i_2!`%`_uN.0 * ($truncz(((i_1!`%`_uN.0 : nat <:> rat) / (i_2!`%`_uN.0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, i_1!`%`_uN.0)) /\ (j_2 = $signed_(N, i_2!`%`_uN.0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 <= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 > i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if (i_1!`%`_uN.0 >= i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if (i_1!`%`_uN.0 < i_2!`%`_uN.0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 + i_2!`%`_uN.0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) + $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, ((i_1!`%`_uN.0 : nat <:> int) - (i_2!`%`_uN.0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, i_1!`%`_uN.0) - $signed_(N, i_2!`%`_uN.0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool((i_1!`%`_uN.0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 < i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) < $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 > i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) > $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 <= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) <= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1!`%`_uN.0 >= i_2!`%`_uN.0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, i_1!`%`_uN.0) >= $signed_(N, i_2!`%`_uN.0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if (i!`%`_uN.0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[i!`%`_uN.0] else (if ($signed_(N, i!`%`_uN.0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[(i!`%`_uN.0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(c!`%`_uN.0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))!`%`_uN.0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN(i!`%`_uN.0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN(i!`%`_uN.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - (M!`%`_dim.0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))!`%`_uN.0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[i!`%`_uN.0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, M_2!`%`_dim.0) : M_2!`%`_dim.0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^M_1!`%`_dim.0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN((i!`%`_uN.0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = i!`%`_uN.0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[i!`%`_uN.0 : k!`%`_uN.0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, M_2!`%`_dim.0),), `%`_laneidx(M_2!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, M_2!`%`_dim.0),)) + -- wf_uN: `%%`(8, `%`_uN(M_2!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx(M_1!`%`_dim.0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN(M_1!`%`_dim.0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = ?(val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[x!`%`_uN.0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[x!`%`_uN.0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[x!`%`_uN.0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[x!`%`_uN.0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[x!`%`_uN.0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[x!`%`_uN.0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[x!`%`_uN.0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if (i'!`%`_uN.0 = (|r'*{r' <- `r'*`}| + n)) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if ((i'!`%`_uN.0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if ((i'!`%`_uN.0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if (i'!`%`_uN.0 <= j!`%`_uN.0))?{j <- `j?`} + -- if (i'!`%`_uN.0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if (l!`%`_uN.0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if (l!`%`_uN.0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx((((l!`%`_uN.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if (!($proj_num__0(c))!`%`_uN.0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if (!($proj_num__0(c))!`%`_uN.0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0])]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[!($proj_num__0(i))!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if (!($proj_num__0(c))!`%`_uN.0 = $prod($inez_($jsizenn(Jnn), !($proj_lane__2(i)))!`%`_uN.0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^M!`%`_dim.0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_uN.0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[i!`%`_uN.0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[i!`%`_uN.0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__(sh_1!`%`_ishape.0, sh_2!`%`_ishape.0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[!($proj_num__0(i))!`%`_uN.0] : ref <: instr)]) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if (n =/= 0) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$table(z, x_1).REFS_tableinst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$table(z, x).REFS_tableinst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) <= |$table(z, x).REFS_tableinst|) /\ ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if (n =/= 0) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) <= |$table(z, x).REFS_tableinst|) /\ ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((K * M!`%`_dim.0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))^M!`%`_dim.0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(j!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[(!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[j!`%`_uN.0] = mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN(k!`%`_uN.0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if (n =/= 0) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ ((!($proj_num__0(i_2))!`%`_uN.0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if (n =/= 0) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ ((!($proj_num__0(i_2))!`%`_uN.0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if (!($proj_num__0(i_1))!`%`_uN.0 > !($proj_num__0(i_2))!`%`_uN.0) + -- if (n =/= 0) + -- if (((!($proj_num__0(i_1))!`%`_uN.0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ ((!($proj_num__0(i_2))!`%`_uN.0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) > |$mem(z, x).BYTES_meminst|) \/ ((!($proj_num__0(j))!`%`_uN.0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) <= |$mem(z, x).BYTES_meminst|) /\ ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if (n =/= 0) + -- if (((!($proj_num__0(i))!`%`_uN.0 + n) <= |$mem(z, x).BYTES_meminst|) /\ ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0]!`%`_byte.0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0])]) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[x!`%`_uN.0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[i!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[!($proj_num__0(i))!`%`_uN.0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(i))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[!($proj_num__0(i))!`%`_uN.0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[!($proj_num__0(i))!`%`_uN.0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if (n =/= 0) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if (n =/= 0) + -- if ((!($proj_num__0(i_2))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ((!($proj_num__0(i_1))!`%`_uN.0 <= !($proj_num__0(i_2))!`%`_uN.0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_1))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i_2))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_1))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(((((!($proj_num__0(i_2))!`%`_uN.0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if (n =/= 0) + -- if ((!($proj_num__0(j))!`%`_uN.0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (ref = $elem(z, y).REFS_eleminst[!($proj_num__0(j))!`%`_uN.0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ((!($proj_num__0(i))!`%`_uN.0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((!($proj_num__0(j))!`%`_uN.0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[!($proj_num__0(j))!`%`_uN.0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(i))!`%`_uN.0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((!($proj_num__0(j))!`%`_uN.0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[x!`%`_uN.0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), [])) + -- if (!($proj_num__0(i))!`%`_uN.0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, !($proj_num__0(i))!`%`_uN.0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if (((!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if ((M!`%`_dim.0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, (!($proj_num__0(i))!`%`_uN.0 + ao.OFFSET_memarg!`%`_uN.0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[j!`%`_uN.0]))!`%`_uN.0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, i!`%`_uN.0, !($packfield_(zt*{zt <- `zt*`}[i!`%`_uN.0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if (!($proj_num__0(i))!`%`_uN.0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, !($proj_num__0(i))!`%`_uN.0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if (x!`%`_uN.0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^(i!`%`_uN.0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^i!`%`_uN.0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[x!`%`_uN.0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[x!`%`_uN.0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[x!`%`_uN.0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if (x!`%`_uN.0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[x_1!`%`_uN.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[x!`%`_uN.0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * (i!`%`_sN.0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8(name!`%`_name.0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if (x33!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx((i!`%`_sN.0 : int <:> nat),)) + -- if (i!`%`_sN.0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte(l!`%`_uN.0,):Bbyte => `%`_laneidx(l!`%`_uN.0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_uN.0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_uN.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_uN.0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if ((((c!`%`_char.0 >= 32) /\ (c!`%`_char.0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c!`%`_char.0 =/= 10) /\ (c!`%`_char.0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, i!`%`_sN.0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[x!`%`_uN.0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[x!`%`_uN.0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[x!`%`_uN.0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[x!`%`_uN.0] = ?()]) + -- if (?(id) = I.LABELS_I[x!`%`_uN.0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/08-uncase-removal.il b/spectec/test-middlend/specification.exp/08-uncase-removal.il new file mode 100644 index 0000000000..88fbde7083 --- /dev/null +++ b/spectec/test-middlend/specification.exp/08-uncase-removal.il @@ -0,0 +1,16908 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + -- (wf_uN: `%%`(64, u64))?{u64 <- `u64?`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = ?($size(numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = ?($vsize(vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = ?($psize(packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = ?(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = ?(vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = ?(consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ?(($lunpack(lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = ?(dt) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = !($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = (!($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * $proj_dim_0(dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if ((($proj_sz_0(sz).0 * $proj_dim_0(M).0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim($proj_bshape_0(bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if (C.TYPES_context[$proj_uN_0(typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(?(VCONST_val(Vnn, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]))*{l <- `l*`} + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[$proj_uN_0(y).0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * $proj_dim_0(M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($dim($proj_bshape_0(sh).0)).0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[$proj_uN_0(x).0]) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else (if ($signed_(N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[($proj_uN_0(i).0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c).0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($proj_uN_0($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c).0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN($proj_uN_0(i).0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN($proj_uN_0(i).0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))).0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))).0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[$proj_uN_0(i).0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $proj_uN_0(i).0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = ?(val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if ($proj_uN_0(i').0 = (|r'*{r' <- `r'*`}| + n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j).0))?{j <- `j?`} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j).0))?{j <- `j?`} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(Jnn), !($proj_lane__2(i)))).0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^$proj_dim_0(M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0] : ref <: instr)]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((K * $proj_dim_0(M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(M).0){j <- `j*`} + -- if ((c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))^$proj_dim_0(M).0{j <- `j*`})) /\ ($jsizenn(Jnn) = (K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))))^$proj_dim_0(M).0{j <- `j*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])) : val <: instr)]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (ref = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), [])) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), [])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), [])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if ($proj_uN_0(x).0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[$proj_uN_0(x).0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if ($proj_uN_0(x).0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- if $NotImmutReachable(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8($proj_name_0(name).0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/09-sideconditions.il b/spectec/test-middlend/specification.exp/09-sideconditions.il new file mode 100644 index 0000000000..d3541b337c --- /dev/null +++ b/spectec/test-middlend/specification.exp/09-sideconditions.il @@ -0,0 +1,17337 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'*{n' <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w*{w <- `w*`}] ++ w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w^n{w <- `w*`}] ++ w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w?{w <- `w?`}] ++ w'?{w' <- `w'?`}*{`w'?` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'*{w' <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'*{w' <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w*{w <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'*{w' <- `w'*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w*{w <- `w*`}*{`w*` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1*{w_1 <- `w_1*`}] ++ w*{w <- `w*`}*{`w*` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch*{ch <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx*{xx <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx*{xx <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'*{free' <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{numtype : numtype}((numtype : numtype <: lanetype)) = $size(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize{packtype : packtype}((packtype : packtype <: lanetype)) = $psize(packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{numtype : numtype}((numtype : numtype <: storagetype)) = ?($size(numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{vectype : vectype}((vectype : vectype <: storagetype)) = ?($vsize(vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize{packtype : packtype}((packtype : packtype <: storagetype)) = ?($psize(packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{numtype : numtype}((numtype : numtype <: lanetype)) = numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack{packtype : packtype}((packtype : packtype <: lanetype)) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{valtype : valtype}((valtype : valtype <: storagetype)) = valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{packtype : packtype}((packtype : packtype <: storagetype)) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{numtype : numtype}((numtype : numtype <: storagetype)) = ?(numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack{vectype : vectype}((vectype : vectype <: storagetype)) = ?(vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{consttype : consttype}((consttype : consttype <: storagetype)) = ?(consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{packtype : packtype}((packtype : packtype <: storagetype)) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack{lanetype : lanetype}((lanetype : lanetype <: storagetype)) = ?(($lunpack(lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{dt : deftype}((dt : deftype <: typeuse)) = ?(dt) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype(dt : deftype <: typeuse)] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = !($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = (!($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut?{mut <- `mut?`}, t), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1*{xt_1 <- `xt_1*`}, xt_2*{xt_2 <- `xt_2*`}), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu^n{tu <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut?{mut <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1*{externtype_1 <- `externtype_1*`}, externtype_2*{externtype_2 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * $proj_dim_0(dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if ((($proj_sz_0(sz).0 * $proj_dim_0(M).0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim($proj_bshape_0(bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{numtype : numtype, c : num_}((numtype : numtype <: consttype), mk_lit__0_lit_(numtype, c)) = CONST_instr(numtype, c) + -- wf_instr: `%`(CONST_instr(numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{vectype : vectype, c : uN}((vectype : vectype <: consttype), mk_lit__1_lit_(vectype, c)) = VCONST_instr(vectype, c) + -- wf_instr: `%`(VCONST_instr(vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype?{valtype <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr)*{instr <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr*{instr <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local*{local <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte*{byte <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr*{expr <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func*{func <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x*{x <- `x*`}, [lct_1] ++ lct*{lct <- `lct*`}) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt*{dt <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(dt*{dt <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'*{dt' <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- if (C.TYPES_context[$proj_uN_0(typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- if (|`comptype'*`| = |`typeuse*`|) + -- if (|`comptype'*`| = |`typeuse'**`|) + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- if (|`ft_1*`| = |`ft_2*`|) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- if (i < |typeuse*{typeuse <- `typeuse*`}|) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (j < |typeuse*{typeuse <- `typeuse*`}|) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`t_1*`| = |`t_2*`|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`lct*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- `x*`} + -- if (|`comptype'*`| = |`x*`|) + -- if (|`comptype'*`| = |`yy**`|) + -- (if ($proj_uN_0(x).0 < |C.TYPES_context|))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- if (|`t*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Inn : addrtype}((Inn : addrtype <: valtype)) = ?(?(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Fnn : Fnn}((Fnn : Fnn <: valtype)) = ?(?(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{Vnn : vectype}((Vnn : vectype <: valtype)) = ?(?(VCONST_val(Vnn, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(Vnn, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if ($proj_uN_0(l).0 < |C.LABELS_context|))*{l <- `l*`} + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]))*{l <- `l*`} + -- if ($proj_uN_0(l').0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (|C.REFS_context| > 0) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- if ($proj_uN_0(x_2).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[$proj_uN_0(y).0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if ($proj_uN_0(x_2).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if ($proj_uN_0(x_2).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * $proj_dim_0(M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($dim($proj_bshape_0(sh).0)).0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (|[mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]| > 0) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[$proj_uN_0(x).0]) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`lct*`| = |`local*`|) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- if (|`import*`| = |`xt_I*`|) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- if (|`jt*`| = |`tag*`|) + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- if (|`mem*`| = |`mt*`|) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- if (|`table*`| = |`tt*`|) + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- if (|`dt*`| = |`func*`|) + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- if (|`data*`| = |`ok*`|) + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- if (|`elem*`| = |`rt*`|) + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- if (|`export*`| = |`nm*`|) + -- if (|`export*`| = |`xt_E*`|) + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{valtype : valtype}((valtype : valtype <: storagetype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{packtype : packtype}((packtype : packtype <: storagetype)) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = mk_lane__2_lane_(Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, $fzero($size((Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), c) = mk_lane__0_lane_(numtype, c) + -- wf_lane_: `%%`((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lane_: `%%`((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c)) + -- wf_lit_: `%%`((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, $wrap__($size($lunpack((packtype : packtype <: lanetype))), $psize(packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{numtype : numtype, c : num_}((numtype : numtype <: lanetype), mk_lane__0_lane_(numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: lanetype), mk_lane__1_lane_(packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{consttype : consttype, c : lit_}((consttype : consttype <: storagetype), c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{packtype : packtype, c : uN}((packtype : packtype <: storagetype), mk_lit__2_lit_(packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), $size($lunpack((packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CLZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iclz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, CTZ_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ictz_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, POPCNT_unop_Inn), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ipopcnt_($sizenn((Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Inn : addrtype, N' : nat, i : uN}((Inn : addrtype <: numtype), mk_unop__0_unop_(Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(Inn, i)) = [mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iextend_($sizenn((Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, ABS_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fabs_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEG_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fneg_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, SQRT_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsqrt_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, CEIL_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fceil_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, FLOOR_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ffloor_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, TRUNC_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $ftrunc_($sizenn((Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{Fnn : Fnn, f : fN}((Fnn : Fnn <: numtype), mk_unop__1_unop_(Fnn, NEAREST_unop_Fnn), mk_num__1_num_(Fnn, f)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fnearest_($sizenn((Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iadd_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $isub_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $imul_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, DIV_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($idiv_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, REM_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = mk_num__0_num_(Inn, iter_0)*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, iter_0)))*{iter_0 <- lift($irem_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, AND_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $iand_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, OR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ior_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, XOR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ixor_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SHR_binop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $ishr_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTL_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotl_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ROTR_binop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = [mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $irotr_($sizenn((Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, ADD_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fadd_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, SUB_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fsub_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MUL_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmul_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, DIV_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fdiv_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MIN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmin_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, MAX_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fmax_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_binop__1_binop_(Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = mk_num__1_num_(Fnn, iter_0)*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0)))*{iter_0 <- $fcopysign_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{Inn : addrtype, i : uN}((Inn : addrtype <: numtype), mk_testop__0_testop_(Inn, EQZ_testop_Inn), mk_num__0_num_(Inn, i)) = $ieqz_($sizenn((Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, EQ_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ieq_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, NE_relop_Inn), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ine_($sizenn((Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ilt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GT_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $igt_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, LE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ile_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Inn : addrtype, sx : sx, i_1 : uN, i_2 : uN}((Inn : addrtype <: numtype), mk_relop__0_relop_(Inn, GE_relop_Inn(sx)), mk_num__0_num_(Inn, i_1), mk_num__0_num_(Inn, i_2)) = $ige_($sizenn((Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, EQ_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $feq_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, NE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fne_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $flt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GT_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fgt_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, LE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fle_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{Fnn : Fnn, f_1 : fN, f_2 : fN}((Fnn : Fnn <: numtype), mk_relop__1_relop_(Fnn, GE_relop_Fnn), mk_num__1_num_(Fnn, f_1), mk_num__1_num_(Fnn, f_2)) = $fge_($sizenn((Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $extend__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Inn_2 : addrtype, i_1 : uN}((Inn_1 : addrtype <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___0_cvtop__(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(Inn_1, i_1)) = [mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, $wrap__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, sx : sx, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(Fnn_1, f_1)) = mk_num__0_num_(Inn_2, iter_0)*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, iter_0)))*{iter_0 <- lift($trunc_sat__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Inn_2 : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, sx : sx, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(Inn_1, i_1)) = [mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, $convert__($sizenn1((Inn_1 : addrtype <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $promote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Fnn_2 : Fnn, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(Fnn_1, f_1)) = mk_num__1_num_(Fnn_2, iter_0)*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, iter_0)))*{iter_0 <- $demote__($sizenn1((Fnn_1 : Fnn <: numtype)), $sizenn2((Fnn_2 : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Inn_1 : addrtype, Fnn_2 : Fnn, i_1 : uN}((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_cvtop___1_cvtop__(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(Inn_1, i_1)) = [$reinterpret__((Inn_1 : addrtype <: numtype), (Fnn_2 : Fnn <: numtype), mk_num__0_num_(Inn_1, i_1))] + -- if ($size((Inn_1 : addrtype <: numtype)) = $size((Fnn_2 : Fnn <: numtype))) + -- wf_num_: `%%`((Inn_1 : addrtype <: numtype), mk_num__0_num_(Inn_1, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{Fnn_1 : Fnn, Inn_2 : addrtype, f_1 : fN}((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_cvtop___2_cvtop__(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(Fnn_1, f_1)) = [$reinterpret__((Fnn_1 : Fnn <: numtype), (Inn_2 : addrtype <: numtype), mk_num__1_num_(Fnn_1, f_1))] + -- if ($size((Fnn_1 : Fnn <: numtype)) = $size((Inn_2 : addrtype <: numtype))) + -- wf_num_: `%%`((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = zero?{zero <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx))) = half?{half <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, zero : zero}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c*{c <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else (if ($signed_(N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[($proj_uN_0(i).0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))))}*{c_1 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`})] + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(Jnn, iter_0)*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, !($proj_lane__2(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Jnn : Jnn <: lanetype), mk_lane__2_lane_(Jnn, iter_0)))*{iter_0 <- $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)), !($proj_lane__2(c_3)))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))*{c <- `c*`})*{`c*` <- `c**`} + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3*{c_3 <- `c_3*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((Fnn : Fnn <: numtype), !($proj_lane__0(c)))))*{c <- `c*`}*{`c*` <- `c**`} + -- (wf_lane_: `%%`((Fnn : Fnn <: lanetype), mk_lane__0_lane_((Fnn : Fnn <: numtype), mk_num__1_num_(Fnn, iter_0))))*{iter_0 <- $f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))), !($proj_num__1(!($proj_lane__0(c_3)))))}*{c_1 <- `c_1*`, c_2 <- `c_2*`, c_3 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $lsizenn((Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), !($proj_lane__2(c_2)))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{Fnn : Fnn, M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c).0,)))*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $extend__(1, $sizenn((Fnn : Fnn <: numtype)), S_sx, `%`_iN($proj_uN_0($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))).0,))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + -- if ($isize(Inn) = $fsize(Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c).0,)))))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn((Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1)))), !($proj_num__1(!($proj_lane__0(c_2)))))).0,)))*{c_1 <- `c_1*`, c_2 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{Jnn : Jnn, M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1)), `%`_iN($proj_uN_0(i).0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{Jnn : Jnn, M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)), `%`_iN($proj_uN_0(i).0,))*{c_1 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{Jnn : Jnn, M : dim, v_1 : uN, c : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))).0,)*{c_1 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1)), `%`_iN(0,))).0,),))*{c_1 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{Jnn : Jnn, M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn((Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1))*{c_1 <- `c_1*`}, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, c)))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{Jnn : Jnn, M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), i*{i <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c*{c <- `c*`} = c_1*{c_1 <- `c_1*`} ++ c_2*{c_2 <- `c_2*`}[$proj_uN_0(i).0]*{i <- `i*`} + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Fnn : Fnn, M : dim, v : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vunop__1_vunop_(Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{Jnn : Jnn, M : dim, v : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vunop__0_vunop_(Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vbinop__0_vbinop_(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vbinop__1_vbinop_(Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vternop__0_vternop_(Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vternop__1_vternop_(Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Jnn : Jnn, M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vrelop__0_vrelop_(Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{Fnn : Fnn, M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape((Fnn : Fnn <: lanetype), M), mk_vrelop__1_vrelop_(Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__2_lane_(Jnn_2, c)] + -- let{c : iN} c = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Jnn_1 : Jnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half?{half <- `half?`}, sx)), mk_lane__2_lane_(Jnn_1, c_1)) = [mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))] + -- let{c : fN} c = $convert__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $trunc_sat__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Inn_2 : addrtype, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : addrtype <: lanetype), M_2), mk_vcvtop___2_vcvtop__(Fnn_1, M_1, (Inn_2 : addrtype <: Jnn), M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero?{zero <- `zero?`})), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = lift(mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))?{c <- `c?`}) + -- let{`c?` : iN?} c?{c <- `c?`} = $relaxed_trunc__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Inn_2 : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn_2 : addrtype <: lanetype), M_2)), mk_lane__0_lane_((Inn_2 : addrtype <: numtype), mk_num__0_num_(Inn_2, c))))?{c <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $demote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{Fnn_1 : Fnn, M_1 : dim, Fnn_2 : Fnn, M_2 : dim, c_1 : fN}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2), mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_((Fnn_1 : Fnn <: numtype), mk_num__1_num_(Fnn_1, c_1))) = mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))*{c <- `c*`} + -- let{`c*` : fN*} c*{c <- `c*`} = $promote__($lsizenn1((Fnn_1 : Fnn <: lanetype)), $lsizenn2((Fnn_2 : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)), mk_lane__0_lane_((Fnn_2 : Fnn <: numtype), mk_num__1_num_(Fnn_2, c))))*{c <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c*{c <- `c*`}*{`c*` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1)*{c_1 <- `c_1*`} ++ [$zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c*{c <- `c*`})*{`c*` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{Jnn : Jnn, M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), mk_vshiftop__0_vshiftop_(Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{Jnn : Jnn, M : dim, v : uN}(`%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),), v) = $ivbitmaskop_(`%X%`_shape((Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i*{i <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $narrow__($lsize((Jnn_1 : Jnn <: lanetype)), $lsize((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c'_1)*{c'_1 <- `c'_1*`} ++ mk_lane__2_lane_(Jnn_2, c'_2)*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_1)))*{c'_1 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c'_2)))*{c'_2 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i*{i <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $proj_uN_0(i).0*{i <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1,)))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2,)))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, c)*{c <- `c*`}) + -- let{`c_1*` : lane_*} c_1*{c_1 <- `c_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2*{c_2 <- `c_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1*{c'_1 <- `c'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1)))*{c_1 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2*{c'_2 <- `c'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), $lsizenn2((Jnn_2 : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2)))*{c_2 <- `c_2*`} + -- let{`c*` : iN*} c*{c <- `c*`} = $f_($lsizenn2((Jnn_2 : Jnn <: lanetype)), c'_1*{c'_1 <- `c'_1*`}, c'_2*{c'_2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, c)))*{c <- `c*`} + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1 j_2]*{j_1 <- `j_1*`, j_2 <- `j_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1))*{j_1 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2))*{j_2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{Jnn_1 : Jnn, M_1 : dim, Jnn_2 : Jnn, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),), `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),), mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))), $lsizenn2((Jnn_2 : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1*{ci_1 <- `ci_1*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2*{ci_2 <- `ci_2*`} = $lanes_(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1*{ci'_1 <- `ci'_1*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1)))*{ci_1 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2*{ci'_2 <- `ci'_2*`} = $extend__($lsizenn1((Jnn_1 : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2)))*{ci_2 <- `ci_2*`} + -- let{`ci*` : iN*} ci*{ci <- `ci*`} = $ivrelaxed_dot_(N, ci'_1*{ci'_1 <- `ci'_1*`}, ci'_2*{ci'_2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'*{ci' <- `ci'*`} = $extend__(N, $lsizenn2((Jnn_2 : Jnn <: lanetype)), S_sx, ci)*{ci <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_lane__2_lane_(Jnn_2, iter_0)*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)), mk_lane__2_lane_(Jnn_2, iter_0)))*{iter_0 <- $ivadd_pairwise_($lsizenn2((Jnn_2 : Jnn <: lanetype)), ci'*{ci' <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(Jnn_2, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{packtype : packtype, i : uN}((packtype : packtype <: storagetype), CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(packtype, $wrap__(32, $psize(packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{valtype : valtype, val : val}((valtype : valtype <: storagetype), ?(), (val : val <: fieldval)) = ?(val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{packtype : packtype, sx : sx, i : uN}((packtype : packtype <: storagetype), ?(sx), PACK_fieldval(packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa*{xa <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa*{xa <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b*{b <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r*{r <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b*{b <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}}) + -- if ($proj_uN_0(i').0 = (|r'*{r' <- `r'*`}| + n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j).0))?{j <- `j?`} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j?{j <- `j?`}), rt), REFS r'*{r' <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b*{b <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j).0))?{j <- `j?`} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j?{j <- `j?`})), BYTES b*{b <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val*{val <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.STRUCTS_store|) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.ARRAYS_store|) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (a < |s.EXNS_store|) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (a < |s.TAGS_store|) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (a < |s.GLOBALS_store|) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (a < |s.MEMS_store|) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (a < |s.TABLES_store|) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l*{l <- `l*`}|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (|$unop_(nt, unop, c_1)| > 0) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (|$binop_(nt, binop, c_1, c_2)| > 0) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (|$cvtop__(nt_1, nt_2, cvtop, c_1)| > 0) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvunop_(V128_vectype, vvunop, c_1)| > 0) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvbinop_(V128_vectype, vvbinop, c_1, c_2)| > 0) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vunop_(sh, vunop, c_1)| > 0) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vbinop_(sh, vbinop, c_1, c_2)| > 0) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if ($proj_num__0(c) =/= ?()) + -- (if ($proj_lane__2(i) =/= ?()))*{i <- `i*`} + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(Jnn), !($proj_lane__2(i)))).0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^$proj_dim_0(M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)|) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if ($proj_num__0(c_2) =/= ?()) + -- if ($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)|) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t?{t <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- if (a < |$s(z).FUNCS_store|) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0] : ref <: instr)]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((K * $proj_dim_0(M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($proj_num__0(i) =/= ?()))^(k<$proj_dim_0(M).0){} + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(M).0){j <- `j*`} + -- if ((c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))^$proj_dim_0(M).0{j <- `j*`})) /\ ($jsizenn(Jnn) = (K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))))^$proj_dim_0(M).0{j <- `j*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$data(z, y).BYTES_datainst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`val*`| = |`zt*`|) + -- (if ($default_($unpack(zt)) =/= ?()))*{zt <- `zt*`} + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])) : val <: instr)]) + -- if ($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- if ($proj_uN_0(i).0 < |$s(z).STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |$s(z).STRUCTS_store|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) =/= ?()) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if ($proj_num__0(i) =/= ?()) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(i) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- (if ($cunpack(zt) =/= ?()))^n{} + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zsize(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])) : val <: instr)]) + -- if ($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0]) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_num__0(i) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- if (a < |$s(z).ARRAYS_store|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if (ref = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- if ($cunpack(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if (a < |$s(z).FUNCS_store|) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- (if ($default_(t) =/= ?()))*{t <- `t*`} + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- if ($as_deftype($tag(z, x).TYPE_taginst) =/= ?()) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if ($growtable($table(z, x), n, ref) =/= ?()) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(c) =/= ?()) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if ($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]) =/= ?()) + -- if ($proj_uN_0(j).0 < |$lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)|) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if ($growmem($mem(z, x), n) =/= ?()) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`, zt <- `zt*`} + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), [])) + -- if ($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`} + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($packfield_(zt, val) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'*{type' <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'*{deftype' <- `deftype'*`} = $alloctypes(type'*{type' <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype*{deftype <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype' : deftype <: typeuse)*{deftype' <- `deftype'*`})) + -- if ($proj_uN_0(x).0 = |deftype'*{deftype' <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'*{tagtype' <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'*{ja' <- `ja'*`}) = $alloctags(s_1, tagtype'*{tagtype' <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'*{globaltype' <- `globaltype'*`}, [val] ++ val'*{val' <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'*{ga' <- `ga'*`}) = $allocglobals(s_1, globaltype'*{globaltype' <- `globaltype'*`}, val'*{val' <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j?{j <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'*{memtype' <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'*{ma' <- `ma'*`}) = $allocmems(s_1, memtype'*{memtype' <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j?{j <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'*{tabletype' <- `tabletype'*`}, [ref] ++ ref'*{ref' <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'*{ta' <- `ta'*`}) = $alloctables(s_1, tabletype'*{tabletype' <- `tabletype'*`}, ref'*{ref' <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'*{dt' <- `dt'*`}, [funccode] ++ funccode'*{funccode' <- `funccode'*`}, [moduleinst] ++ moduleinst'*{moduleinst' <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'*{fa' <- `fa'*`}) = $allocfuncs(s_1, dt'*{dt' <- `dt'*`}, funccode'*{funccode' <- `funccode'*`}, moduleinst'*{moduleinst' <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte*{byte <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte*{byte <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte*{byte <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'*{ok' <- `ok'*`}, [b*{b <- `b*`}] ++ b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b*{b <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'*{da' <- `da'*`}) = $allocdatas(s_1, ok'*{ok' <- `ok'*`}, b'*{b' <- `b'*`}*{`b'*` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref*{ref <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref*{ref <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref*{ref <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'*{rt' <- `rt'*`}, [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref*{ref <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'*{ea' <- `ea'*`}) = $allocelems(s_1, rt'*{rt' <- `rt'*`}, ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export*{export <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (tag*{tag <- `tag*`} = TAG_tag(tagtype)*{tagtype <- `tagtype*`}) + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (mem*{mem <- `mem*`} = MEMORY_mem(memtype)*{memtype <- `memtype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (func*{func <- `func*`} = FUNC_func(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I*{aa_I <- `aa_I*`} = $tagsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I*{ga_I <- `ga_I*`} = $globalsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I*{ma_I <- `ma_I*`} = $memsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I*{ta_I <- `ta_I*`} = $tablesxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I*{fa_I <- `fa_I*`} = $funcsxa(externaddr*{externaddr <- `externaddr*`}) + -- let{`dt*` : deftype*} dt*{dt <- `dt*`} = $alloctypes(type*{type <- `type*`}) + -- let{`fa*` : nat*} fa*{fa <- `fa*`} = (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa*{aa <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tagtype <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga*{ga <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{globaltype <- `globaltype*`}, val_G*{val_G <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma*{ma <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{memtype <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta*{ta <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{tabletype <- `tabletype*`}, ref_T*{ref_T <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da*{da <- `da*`}) = $allocdatas(s_4, OK_datatype^|data*{data <- `data*`}|{}, byte*{byte <- `byte*`}*{`byte*` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea*{ea <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype, (dt : deftype <: typeuse)*{dt <- `dt*`})*{elemtype <- `elemtype*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- if ((s_7, fa*{fa <- `fa*`}) = $allocfuncs(s_6, dt*{dt <- `dt*`}[$proj_uN_0(x).0]*{x <- `x*`}, FUNC_funccode(x, local*{local <- `local*`}, expr_F)*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`}, moduleinst^|func*{func <- `func*`}|{})) + -- if (xi*{xi <- `xi*`} = $allocexports({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export*{export <- `export*`})) + -- if (moduleinst = {TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype),))*{tagtype <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype),))*{memtype <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr_F),))*{expr_F <- `expr_F*`, `local*` <- `local**`, x <- `x*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, elemtype <- `elemtype*`, `expr_E*` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt*{dt <- `dt*`}, TAGS aa_I*{aa_I <- `aa_I*`} ++ aa*{aa <- `aa*`}, GLOBALS ga_I*{ga_I <- `ga_I*`} ++ ga*{ga <- `ga*`}, MEMS ma_I*{ma_I <- `ma_I*`} ++ ma*{ma <- `ma*`}, TABLES ta_I*{ta_I <- `ta_I*`} ++ ta*{ta <- `ta*`}, FUNCS fa_I*{fa_I <- `fa_I*`} ++ fa*{fa <- `fa*`}, DATAS da*{da <- `da*`}, ELEMS ea*{ea <- `ea*`}, EXPORTS xi*{xi <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b^n{b <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b^n{b <- `b*`}, ACTIVE_datamode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e^n{e <- `e*`}, ACTIVE_elemmode(y, instr*{instr <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'*{ref' <- `ref'*`}) = $evalexprs(z', expr'*{expr' <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr*{expr <- `expr*`}] ++ expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref*{ref <- `ref*`}) = $evalexprs(z, expr*{expr <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) = $evalexprss(z', expr'*{expr' <- `expr'*`}*{`expr'*` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'*{gt' <- `gt'*`}, [expr] ++ expr'*{expr' <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'*{val' <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'*{gt' <- `gt'*`}, expr'*{expr' <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr*{externaddr <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr, xt_I))*{externaddr <- `externaddr*`, xt_I <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) = module + -- if (global*{global <- `global*`} = GLOBAL_global(globaltype, expr_G)*{expr_G <- `expr_G*`, globaltype <- `globaltype*`}) + -- if (table*{table <- `table*`} = TABLE_table(tabletype, expr_T)*{expr_T <- `expr_T*`, tabletype <- `tabletype*`}) + -- if (data*{data <- `data*`} = DATA_data(byte*{byte <- `byte*`}, datamode)*{`byte*` <- `byte**`, datamode <- `datamode*`}) + -- if (elem*{elem <- `elem*`} = ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode)*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`}) + -- if (start?{start <- `start?`} = START_start(x)?{x <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G*{val_G <- `val_G*`}) = $evalglobals(z, globaltype*{globaltype <- `globaltype*`}, expr_G*{expr_G <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T*{ref_T <- `ref_T*`}) = $evalexprs(z', expr_T*{expr_T <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) = $evalexprss(z'', expr_E*{expr_E <- `expr_E*`}*{`expr_E*` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr*{externaddr <- `externaddr*`}, val_G*{val_G <- `val_G*`}, ref_T*{ref_T <- `ref_T*`}, ref_E*{ref_E <- `ref_E*`}*{`ref_E*` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D*{instr_D <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D,), data*{data <- `data*`}[i_D])^(i_D<|data*{data <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E*{instr_E <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E,), elem*{elem <- `elem*`}[i_E])^(i_E<|elem*{elem <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S?{instr_S <- `instr_S?`} = CALL_instr(x)?{x <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype, expr_G),))*{expr_G <- `expr_G*`, globaltype <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype, expr_T),))*{expr_T <- `expr_T*`, tabletype <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte*{byte <- `byte*`}, datamode),))*{`byte*` <- `byte**`, datamode <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype, expr_E*{expr_E <- `expr_E*`}, elemmode),))*{elemmode <- `elemmode*`, `expr_E*` <- `expr_E**`, reftype <- `reftype*`} + -- (wf_start: `%`(START_start(x),))?{x <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type*{type <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr*{externaddr <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr*{externaddr <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F)^(i_F<|func*{func <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D,)))^(i_D<|data*{data <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E,)))^(i_E<|elem*{elem <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x),))?{x <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val*{val <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val, t_1))*{t_1 <- `t_1*`, val <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'*{I' <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{type : type, `decl'*` : decl*}([(type : type <: decl)] ++ decl'*{decl' <- `decl'*`}) = [type] ++ $typesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{import : import, `decl'*` : decl*}([(import : import <: decl)] ++ decl'*{decl' <- `decl'*`}) = [import] ++ $importsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{tag : tag, `decl'*` : decl*}([(tag : tag <: decl)] ++ decl'*{decl' <- `decl'*`}) = [tag] ++ $tagsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{global : global, `decl'*` : decl*}([(global : global <: decl)] ++ decl'*{decl' <- `decl'*`}) = [global] ++ $globalsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{mem : mem, `decl'*` : decl*}([(mem : mem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [mem] ++ $memsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{table : table, `decl'*` : decl*}([(table : table <: decl)] ++ decl'*{decl' <- `decl'*`}) = [table] ++ $tablesd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{func : func, `decl'*` : decl*}([(func : func <: decl)] ++ decl'*{decl' <- `decl'*`}) = [func] ++ $funcsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{data : data, `decl'*` : decl*}([(data : data <: decl)] ++ decl'*{decl' <- `decl'*`}) = [data] ++ $datasd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{elem : elem, `decl'*` : decl*}([(elem : elem <: decl)] ++ decl'*{decl' <- `decl'*`}) = [elem] ++ $elemsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{start : start, `decl'*` : decl*}([(start : start <: decl)] ++ decl'*{decl' <- `decl'*`}) = [start] ++ $startsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{export : export, `decl'*` : decl*}([(export : export <: decl)] ++ decl'*{decl' <- `decl'*`}) = [export] ++ $exportsd(decl'*{decl' <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'*{decl' <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl*{decl <- `decl*`}) = true + -- if ($importsd(decl*{decl <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl_1*` : decl*, import : import, `decl_2*` : decl*}(decl_1*{decl_1 <- `decl_1*`} ++ [(import : import <: decl)] ++ decl_2*{decl_2 <- `decl_2*`}) = (((((($importsd(decl_1*{decl_1 <- `decl_1*`}) = []) /\ ($tagsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($memsd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1*{decl_1 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1*{decl_1 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if ($proj_uN_0(x).0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i 0) + -- (if (exportinst.ADDR_exportinst <- TAG_externaddr(tagaddr)*{tagaddr <- `tagaddr*`} ++ GLOBAL_externaddr(globaladdr)*{globaladdr <- `globaladdr*`} ++ MEM_externaddr(memaddr)*{memaddr <- `memaddr*`} ++ TABLE_externaddr(tableaddr)*{tableaddr <- `tableaddr*`} ++ FUNC_externaddr(funcaddr)*{funcaddr <- `funcaddr*`}))*{exportinst <- `exportinst*`} + -- if (k <= |funcaddr*{funcaddr <- `funcaddr*`}|) + -- wf_store: `%`(s,) + -- wf_moduleinst: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}},) + -- wf_context: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`zt*`|) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if (ta < |s.TAGS_store|) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if (|`t*`| = |`val*`|) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- if (i < |s.STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |s.STRUCTS_store|) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (i < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- if (i < |s.ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |s.ARRAYS_store|) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- if (i < |s.EXNS_store[a].FIELDS_exninst|) + -- if (a < |s.EXNS_store|) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- if (|`taginst*`| = |`tagtype*`|) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- if (|`globalinst*`| = |`globaltype*`|) + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- if (|`meminst*`| = |`memtype*`|) + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- if (|`tableinst*`| = |`tabletype*`|) + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- if (|`deftype*`| = |`funcinst*`|) + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- if (|`datainst*`| = |`datatype*`|) + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- if (|`eleminst*`| = |`elemtype*`|) + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`fv'*`|) + -- if (|`fv*`| = |`mut?*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (|`fv*`| = |`fv'*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (if (a < |s.TAGS_store|))^(a<|s.TAGS_store|){} + -- (if (a < |s'.TAGS_store|))^(a<|s.TAGS_store|){} + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (if (a < |s.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (if (a < |s'.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (if (a < |s.MEMS_store|))^(a<|s.MEMS_store|){} + -- (if (a < |s'.MEMS_store|))^(a<|s.MEMS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (if (a < |s.TABLES_store|))^(a<|s.TABLES_store|){} + -- (if (a < |s'.TABLES_store|))^(a<|s.TABLES_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (if (a < |s.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (if (a < |s'.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (if (a < |s.DATAS_store|))^(a<|s.DATAS_store|){} + -- (if (a < |s'.DATAS_store|))^(a<|s.DATAS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (if (a < |s.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (if (a < |s'.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (if (a < |s.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (if (a < |s'.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (if (a < |s.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (if (a < |s'.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (if (a < |s.EXNS_store|))^(a<|s.EXNS_store|){} + -- (if (a < |s'.EXNS_store|))^(a<|s.EXNS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'*{X' <- `X'*`}, [Y] ++ Y'*{Y' <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'*{a' <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'*{X' <- `X'*`}, Y'*{Y' <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8($proj_name_0(name).0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/10-sub-expansion.il b/spectec/test-middlend/specification.exp/10-sub-expansion.il new file mode 100644 index 0000000000..ff873a6c94 --- /dev/null +++ b/spectec/test-middlend/specification.exp/10-sub-expansion.il @@ -0,0 +1,19958 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'#1*{n'#1 <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'#2*{n'#2 <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w#72*{w#72 <- `w*`}] ++ w'#85*{w'#85 <- `w'*#2`}*{`w'*#2` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w#73^n{w#73 <- `w*`}] ++ w'#86^n{w'#86 <- `w'*#3`}*{`w'*#3` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w#74?{w#74 <- `w?`}] ++ w'#87?{w'#87 <- `w'?#71`}*{`w'?#71` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'#88*{w'#88 <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'#89*{w'#89 <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w#75*{w#75 <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'#90*{w'#90 <- `w'*`}, w#76*{w#76 <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'#91*{w'#91 <- `w'*`}] ++ w#77*{w#77 <- `w*#1`}*{`w*#1` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w#78*{w#78 <- `w*#2`}*{`w*#2` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'#92*{w'#92 <- `w'*`}, w#79*{w#79 <- `w*#3`}*{`w*#3` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1#1*{w_1#1 <- `w_1*`}] ++ w#80*{w#80 <- `w*#4`}*{`w*#4` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch#1*{ch#1 <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx#1*{xx#1 <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#2*{xx#2 <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx#3*{xx#3 <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#4*{xx#4 <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx#5*{xx#5 <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#6*{xx#6 <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx#7*{xx#7 <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#8*{xx#8 <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx#9*{xx#9 <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#10*{xx#10 <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'#1*{free'#1 <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I32_lanetype) = $size(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I64_lanetype) = $size(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F32_lanetype) = $size(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F64_lanetype) = $size(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I8_lanetype) = $psize(I8_packtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I16_lanetype) = $psize(I16_packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I32_storagetype) = ?($size(I32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I64_storagetype) = ?($size(I64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F32_storagetype) = ?($size(F32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F64_storagetype) = ?($size(F64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(V128_storagetype) = ?($vsize(V128_vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I8_storagetype) = ?($psize(I8_packtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I16_storagetype) = ?($psize(I16_packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size((Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size((Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = (iter_val#1 : addrtype <: Jnn)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize((Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I32_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I64_lanetype) = I64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F32_lanetype) = F32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F64_lanetype) = F64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I8_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I16_lanetype) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(BOT_storagetype) = BOT_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = REF_valtype(`null?`, heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(V128_storagetype) = V128_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F64_storagetype) = F64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F32_storagetype) = F32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I64_storagetype) = I64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I32_storagetype) = I32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I8_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I16_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I32_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I64_storagetype) = ?(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F32_storagetype) = ?(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F64_storagetype) = ?(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I8_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I16_storagetype) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack(V128_storagetype) = ?(V128_vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?(I64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?(F32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?(F64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(V128_storagetype) = ?(V128_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?(($lunpack(I32_lanetype) : numtype <: consttype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?(($lunpack(I64_lanetype) : numtype <: consttype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?(($lunpack(F32_lanetype) : numtype <: consttype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?(($lunpack(F64_lanetype) : numtype <: consttype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?(($lunpack(I8_lanetype) : numtype <: consttype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?(($lunpack(I16_lanetype) : numtype <: consttype)) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size((at_1 : addrtype <: numtype)) <= $size((at_2 : addrtype <: numtype))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#1?{null_1#1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#2?{null_1#2 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1#3?{null_1#3 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{rectype : rectype, n : n}(_DEF_typeuse(rectype, n)) = ?(_DEF_deftype(rectype, n)) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt#1*{xt#1 <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#2*{xt#2 <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt#3*{xt#3 <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#4*{xt#4 <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt#5*{xt#5 <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#6*{xt#6 <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt#7*{xt#7 <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#8*{xt#8 <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{rectype : rectype, n : n, `xt*` : externtype*}([FUNC_externtype(_DEF_typeuse(rectype, n))] ++ xt#9*{xt#9 <- `xt*`}) = [_DEF_deftype(rectype, n)] ++ $funcsxt(xt#10*{xt#10 <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#11*{xt#11 <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?((tv : typevar <: typeuse)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'#1*{tv'#1 <- `tv'*`}, [tu_1] ++ tu'#1*{tu'#1 <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv#1*{tv#1 <- `tv*`}, [tu_1] ++ tu#1*{tu#1 <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv#2*{tv#2 <- `tv*`}, [tu_1] ++ tu#2*{tu#2 <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#2*{tv'#2 <- `tv'*`}, tu'#2*{tu'#2 <- `tu'*`}) = !($minus_recs(tv#3*{tv#3 <- `tv*`}, tu#3*{tu#3 <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv#4*{tv#4 <- `tv*`}, tu#4*{tu#4 <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv#5*{tv#5 <- `tv*`}, tu#5*{tu#5 <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv#6*{tv#6 <- `tv*`}, tu#6*{tu#6 <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_typeuse(var_1), tv#7*{tv#7 <- `tv*`}, tu#7*{tu#7 <- `tu*`}) = !($subst_typevar(REC_typevar(var_1), tv#8*{tv#8 <- `tv*`}, tu#8*{tu#8 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_typeuse(var_0), tv#9*{tv#9 <- `tv*`}, tu#9*{tu#9 <- `tu*`}) = !($subst_typevar(_IDX_typevar(var_0), tv#10*{tv#10 <- `tv*`}, tu#10*{tu#10 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_typeuse(rectype, n), tv#11*{tv#11 <- `tv*`}, tu#11*{tu#11 <- `tu*`}) = ($subst_deftype(_DEF_deftype(rectype, n), tv#12*{tv#12 <- `tv*`}, tu#12*{tu#12 <- `tu*`}) : deftype <: typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_heaptype(var_1), tv#13*{tv#13 <- `tv*`}, tu#13*{tu#13 <- `tu*`}) = (!($subst_typevar(REC_typevar(var_1), tv#14*{tv#14 <- `tv*`}, tu#14*{tu#14 <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_heaptype(var_0), tv#15*{tv#15 <- `tv*`}, tu#15*{tu#15 <- `tu*`}) = (!($subst_typevar(_IDX_typevar(var_0), tv#16*{tv#16 <- `tv*`}, tu#16*{tu#16 <- `tu*`})) : typeuse <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_heaptype(rectype, n), tv#17*{tv#17 <- `tv*`}, tu#17*{tu#17 <- `tu*`}) = ($subst_deftype(_DEF_deftype(rectype, n), tv#18*{tv#18 <- `tv*`}, tu#18*{tu#18 <- `tu*`}) : deftype <: heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv#19*{tv#19 <- `tv*`}, tu#19*{tu#19 <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null#1?{null#1 <- `null?`}, ht), tv#20*{tv#20 <- `tv*`}, tu#20*{tu#20 <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null#2?{null#2 <- `null?`}, $subst_heaptype(ht, tv#21*{tv#21 <- `tv*`}, tu#21*{tu#21 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I32_valtype, tv#22*{tv#22 <- `tv*`}, tu#22*{tu#22 <- `tu*`}) = ($subst_numtype(I32_numtype, tv#23*{tv#23 <- `tv*`}, tu#23*{tu#23 <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I64_valtype, tv#24*{tv#24 <- `tv*`}, tu#24*{tu#24 <- `tu*`}) = ($subst_numtype(I64_numtype, tv#25*{tv#25 <- `tv*`}, tu#25*{tu#25 <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F32_valtype, tv#26*{tv#26 <- `tv*`}, tu#26*{tu#26 <- `tu*`}) = ($subst_numtype(F32_numtype, tv#27*{tv#27 <- `tv*`}, tu#27*{tu#27 <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F64_valtype, tv#28*{tv#28 <- `tv*`}, tu#28*{tu#28 <- `tu*`}) = ($subst_numtype(F64_numtype, tv#29*{tv#29 <- `tv*`}, tu#29*{tu#29 <- `tu*`}) : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(V128_valtype, tv#30*{tv#30 <- `tv*`}, tu#30*{tu#30 <- `tu*`}) = ($subst_vectype(V128_vectype, tv#31*{tv#31 <- `tv*`}, tu#31*{tu#31 <- `tu*`}) : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_valtype(`null?`, heaptype), tv#32*{tv#32 <- `tv*`}, tu#32*{tu#32 <- `tu*`}) = ($subst_reftype(REF_reftype(`null?`, heaptype), tv#33*{tv#33 <- `tv*`}, tu#33*{tu#33 <- `tu*`}) : reftype <: valtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv#34*{tv#34 <- `tv*`}, tu#34*{tu#34 <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_storagetype, tv#35*{tv#35 <- `tv*`}, tu#35*{tu#35 <- `tu*`}) = ($subst_valtype(BOT_valtype, tv#36*{tv#36 <- `tv*`}, tu#36*{tu#36 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_storagetype(`null?`, heaptype), tv#37*{tv#37 <- `tv*`}, tu#37*{tu#37 <- `tu*`}) = ($subst_valtype(REF_valtype(`null?`, heaptype), tv#38*{tv#38 <- `tv*`}, tu#38*{tu#38 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(V128_storagetype, tv#39*{tv#39 <- `tv*`}, tu#39*{tu#39 <- `tu*`}) = ($subst_valtype(V128_valtype, tv#40*{tv#40 <- `tv*`}, tu#40*{tu#40 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F64_storagetype, tv#41*{tv#41 <- `tv*`}, tu#41*{tu#41 <- `tu*`}) = ($subst_valtype(F64_valtype, tv#42*{tv#42 <- `tv*`}, tu#42*{tu#42 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F32_storagetype, tv#43*{tv#43 <- `tv*`}, tu#43*{tu#43 <- `tu*`}) = ($subst_valtype(F32_valtype, tv#44*{tv#44 <- `tv*`}, tu#44*{tu#44 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I64_storagetype, tv#45*{tv#45 <- `tv*`}, tu#45*{tu#45 <- `tu*`}) = ($subst_valtype(I64_valtype, tv#46*{tv#46 <- `tv*`}, tu#46*{tu#46 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I32_storagetype, tv#47*{tv#47 <- `tv*`}, tu#47*{tu#47 <- `tu*`}) = ($subst_valtype(I32_valtype, tv#48*{tv#48 <- `tv*`}, tu#48*{tu#48 <- `tu*`}) : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I8_storagetype, tv#49*{tv#49 <- `tv*`}, tu#49*{tu#49 <- `tu*`}) = ($subst_packtype(I8_packtype, tv#50*{tv#50 <- `tv*`}, tu#50*{tu#50 <- `tu*`}) : packtype <: storagetype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I16_storagetype, tv#51*{tv#51 <- `tv*`}, tu#51*{tu#51 <- `tu*`}) = ($subst_packtype(I16_packtype, tv#52*{tv#52 <- `tv*`}, tu#52*{tu#52 <- `tu*`}) : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut#1?{mut#1 <- `mut?`}, zt), tv#53*{tv#53 <- `tv*`}, tu#53*{tu#53 <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut#2?{mut#2 <- `mut?`}, $subst_storagetype(zt, tv#54*{tv#54 <- `tv*`}, tu#54*{tu#54 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft#1*{ft#1 <- `ft*`},)), tv#55*{tv#55 <- `tv*`}, tu#55*{tu#55 <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft#2, tv#56*{tv#56 <- `tv*`}, tu#56*{tu#56 <- `tu*`})*{ft#2 <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv#57*{tv#57 <- `tv*`}, tu#57*{tu#57 <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv#58*{tv#58 <- `tv*`}, tu#58*{tu#58 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1#2*{t_1#2 <- `t_1*`},), `%`_resulttype(t_2#6*{t_2#6 <- `t_2*`},)), tv#59*{tv#59 <- `tv*`}, tu#59*{tu#59 <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1#3, tv#60*{tv#60 <- `tv*`}, tu#60*{tu#60 <- `tu*`})*{t_1#3 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2#7, tv#61*{tv#61 <- `tv*`}, tu#61*{tu#61 <- `tu*`})*{t_2#7 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final#1?{final#1 <- `final?`}, tu'#3*{tu'#3 <- `tu'*`}, ct), tv#62*{tv#62 <- `tv*`}, tu#62*{tu#62 <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final#2?{final#2 <- `final?`}, $subst_typeuse(tu'#4, tv#63*{tv#63 <- `tv*`}, tu#63*{tu#63 <- `tu*`})*{tu'#4 <- `tu'*`}, $subst_comptype(ct, tv#64*{tv#64 <- `tv*`}, tu#64*{tu#64 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st#1*{st#1 <- `st*`},)), tv#65*{tv#65 <- `tv*`}, tu#65*{tu#65 <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#3*{tv'#3 <- `tv'*`}, tu'#6*{tu'#6 <- `tu'*`}) = !($minus_recs(tv#66*{tv#66 <- `tv*`}, tu#66*{tu#66 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv#67*{tv#67 <- `tv*`}, tu#67*{tu#67 <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv#68*{tv#68 <- `tv*`}, tu#68*{tu#68 <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv#69*{tv#69 <- `tv*`}, tu#69*{tu#69 <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut#3?{mut#3 <- `mut?`}, t), tv#70*{tv#70 <- `tv*`}, tu#70*{tu#70 <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut#4?{mut#4 <- `mut?`}, $subst_valtype(t, tv#71*{tv#71 <- `tv*`}, tu#71*{tu#71 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv#72*{tv#72 <- `tv*`}, tu#72*{tu#72 <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv#73*{tv#73 <- `tv*`}, tu#73*{tu#73 <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv#74*{tv#74 <- `tv*`}, tu#74*{tu#74 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv#75*{tv#75 <- `tv*`}, tu#75*{tu#75 <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv#76*{tv#76 <- `tv*`}, tu#76*{tu#76 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv#77*{tv#77 <- `tv*`}, tu#77*{tu#77 <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv#78*{tv#78 <- `tv*`}, tu#78*{tu#78 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv#79*{tv#79 <- `tv*`}, tu#79*{tu#79 <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv#80*{tv#80 <- `tv*`}, tu#80*{tu#80 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv#81*{tv#81 <- `tv*`}, tu#81*{tu#81 <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv#82*{tv#82 <- `tv*`}, tu#82*{tu#82 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv#83*{tv#83 <- `tv*`}, tu#83*{tu#83 <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv#84*{tv#84 <- `tv*`}, tu#84*{tu#84 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1#1*{xt_1#1 <- `xt_1*`}, xt_2#1*{xt_2#1 <- `xt_2*`}), tv#85*{tv#85 <- `tv*`}, tu#85*{tu#85 <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1#2, tv#86*{tv#86 <- `tv*`}, tu#86*{tu#86 <- `tu*`})*{xt_1#2 <- `xt_1*`}, $subst_externtype(xt_2#2, tv#87*{tv#87 <- `tv*`}, tu#87*{tu#87 <- `tu*`})*{xt_2#2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu#88^n{tu#88 <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final#3?{final#3 <- `final?`}, typeuse#4*{typeuse#4 <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype#36*{subtype#36 <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut#6?{mut#6 <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1#1*{externtype_1#1 <- `externtype_1*`}, externtype_2#1*{externtype_2#1 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size((Inn : addrtype <: numtype)), var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn((Fnn : Fnn <: numtype)), var_x) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = (numtype : numtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = (packtype : packtype <: lanetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize((Jnn : Jnn <: lanetype)), var_x) + -- if (lanetype = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = (numtype : numtype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = (vectype : vectype <: storagetype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = (packtype : packtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = (Inn : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = (Fnn : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) < $sizenn2((Inn_2 : addrtype <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) > $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1((Inn_1 : addrtype <: numtype)) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = $sizenn2((Inn_2 : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) < $sizenn2((Fnn_2 : Fnn <: numtype))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) > $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = (Inn_1 : addrtype <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Inn_2 : addrtype <: numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = (Fnn_1 : Fnn <: numtype)) + -- if (numtype_2 = (Fnn_2 : Fnn <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * $proj_dim_0(dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = (Jnn : Jnn <: lanetype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn((Jnn : Jnn <: lanetype)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn((Jnn : Jnn <: lanetype)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape((Jnn : Jnn <: lanetype), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape((Fnn : Fnn <: lanetype), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape((Jnn : Jnn <: lanetype), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1((Jnn_1 : Jnn <: lanetype))) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2((Fnn_2 : Fnn <: numtype)) = $lsizenn1((Jnn_1 : Jnn <: lanetype))) /\ ($lsizenn1((Jnn_1 : Jnn <: lanetype)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2((Fnn_2 : Fnn <: numtype)) = (2 * $lsizenn1((Jnn_1 : Jnn <: lanetype)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Jnn_2 : Jnn <: lanetype))) /\ ($lsizenn2((Jnn_2 : Jnn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Jnn_2 : Jnn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $sizenn2((Fnn_2 : Fnn <: numtype)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1((Fnn_1 : Fnn <: numtype))) = $sizenn2((Fnn_2 : Fnn <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Jnn_1 : Jnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Jnn_2 : Jnn <: lanetype), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1)) + -- if (shape_2 = `%X%`_shape((Fnn_2 : Fnn <: lanetype), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn((Inn : addrtype <: numtype))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = (Inn : addrtype <: numtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if ((($proj_sz_0(sz).0 * $proj_dim_0(M).0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim($proj_bshape_0(bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= ($lunpack($lanetype(shape)) : numtype <: lanetype))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I32_consttype, mk_lit__0_lit_(I32_numtype, c)) = CONST_instr(I32_numtype, c) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I64_consttype, mk_lit__0_lit_(I64_numtype, c)) = CONST_instr(I64_numtype, c) + -- wf_instr: `%`(CONST_instr(I64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F32_consttype, mk_lit__0_lit_(F32_numtype, c)) = CONST_instr(F32_numtype, c) + -- wf_instr: `%`(CONST_instr(F32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F64_consttype, mk_lit__0_lit_(F64_numtype, c)) = CONST_instr(F64_numtype, c) + -- wf_instr: `%`(CONST_instr(F64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : uN}(V128_consttype, mk_lit__1_lit_(V128_vectype, c)) = VCONST_instr(V128_vectype, c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype#361?{valtype#361 <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'#1*{labelidx'#1 <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'#2*{labelidx'#2 <- `labelidx'*`}) = [`%`_labelidx(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype#362*{valtype#362 <- `valtype*#1`}?{`valtype*#1` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr#2*{instr#2 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr#3*{instr#3 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1#1*{instr_1#1 <- `instr_1*`}, instr_2#1*{instr_2#1 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx#4*{labelidx#4 <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch#1*{catch#1 <- `catch*`},), instr#4*{instr#4 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx#1*{laneidx#1 <- `laneidx*`})) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx#15582?{sx#15582 <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx#15583?{sx#15583 <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx#15584?{sx#15584 <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop#1?{loadop#1 <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop#1?{storeop#1 <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop#1?{vloadop#1 <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr#5*{instr#5 <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr#6)*{instr#6 <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr#7*{instr#7 <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local#1*{local#1 <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte#1*{byte#1 <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr#360*{expr#360 <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type#1*{type#1 <- `type*`},), `%`_list(import#1*{import#1 <- `import*`},), `%`_list(tag#1*{tag#1 <- `tag*`},), `%`_list(global#1*{global#1 <- `global*`},), `%`_list(mem#4*{mem#4 <- `mem*`},), `%`_list(table#4*{table#4 <- `table*`},), `%`_list(func#1*{func#1 <- `func*`},), `%`_list(data#1*{data#1 <- `data*`},), `%`_list(elem#4*{elem#4 <- `elem*`},), start#1?{start#1 <- `start?`}, `%`_list(export#4*{export#4 <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func#2*{func#2 <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x#3*{x#3 <- `x*`}, [lct_1] ++ lct#1*{lct#1 <- `lct*`}) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt#2*{dt#2 <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, (dt' : deftype <: typeuse)*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'#3*{dt'#3 <- `dt'*`} = $clos_deftypes(dt#3*{dt#3 <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#4*{dt#4 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, (dt' : deftype <: typeuse)*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'#4*{dt'#4 <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#5*{dt#5 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#6*{dt#6 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, (dt : deftype <: typeuse)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#7*{dt#7 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{rectype : rectype, n : n, C : context}(C, _DEF_heaptype(rectype, n)) = $unrolldt(_DEF_deftype(rectype, n)) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, (numtype : numtype <: valtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, (vectype : vectype <: valtype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, (reftype : reftype <: valtype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- if (C.TYPES_context[$proj_uN_0(typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, (deftype : deftype <: typeuse)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, (valtype : valtype <: storagetype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, (packtype : packtype <: storagetype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- if (|`comptype'*`| = |`typeuse*`|) + -- if (|`comptype'*`| = |`typeuse'**`|) + -- (if ($unrollht_(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- if (|`ft_1*`| = |`ft_2*`|) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- if (i < |typeuse*{typeuse <- `typeuse*`}|) + -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[$proj_uN_0(typeidx).0] : deftype <: heaptype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + -- if (j < |typeuse*{typeuse <- `typeuse*`}|) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, (numtype_1 : numtype <: valtype), (numtype_2 : numtype <: valtype)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, (vectype_1 : vectype <: valtype), (vectype_2 : vectype <: valtype)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, (reftype_1 : reftype <: valtype), (reftype_2 : reftype <: valtype)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`t_1*`| = |`t_2*`|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, (valtype_1 : valtype <: storagetype), (valtype_2 : valtype <: storagetype)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, (packtype_1 : packtype <: storagetype), (packtype_2 : packtype <: storagetype)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`lct*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`((deftype : deftype <: typeuse), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- `x*`} + -- if (|`comptype'*`| = |`x*`|) + -- if (|`comptype'*`| = |`yy**`|) + -- (if ($proj_uN_0(x).0 < |C.TYPES_context|))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size((addrtype : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size((addrtype : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- if (|`t*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, (deftype_1 : deftype <: typeuse), (deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype(deftype_1 : deftype <: typeuse), FUNC_externtype(deftype_2 : deftype <: typeuse)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(deftype_1 : deftype <: typeuse),) + -- wf_externtype: `%`(FUNC_externtype(deftype_2 : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I32_valtype) = ?(?(CONST_val((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I64_valtype) = ?(?(CONST_val((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F32_valtype) = ?(?(CONST_val((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $fzero($size((F32_Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $fzero($size((F32_Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F64_valtype) = ?(?(CONST_val((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $fzero($size((F64_Fnn : Fnn <: numtype))))))) + -- wf_val: `%`(CONST_val((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $fzero($size((F64_Fnn : Fnn <: numtype))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(V128_valtype) = ?(?(VCONST_val(V128_vectype, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(V128_vectype, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size((at : addrtype <: numtype)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= ($unpack(zt) : valtype <: storagetype)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = (numtype : numtype <: valtype)) \/ (t' = (vectype : vectype <: valtype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if ($proj_uN_0(l).0 < |C.LABELS_context|))*{l <- `l*`} + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]))*{l <- `l*`} + -- if ($proj_uN_0(l').0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype)],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (|C.REFS_context| > 0) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- if ($proj_uN_0(x_2).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[$proj_uN_0(y).0] : reftype <: storagetype), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if ($proj_uN_0(x_2).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if ($proj_uN_0(x_2).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : addrtype <: valtype)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : addrtype <: valtype)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * $proj_dim_0(M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($dim($proj_bshape_0(sh).0)).0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr((Inn : addrtype <: numtype), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (|[mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]| > 0) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr((Inn : addrtype <: numtype), binop),) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`((Inn : addrtype <: numtype), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (rt : reftype <: valtype)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[$proj_uN_0(x).0]) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`lct*`| = |`local*`|) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, (at : addrtype <: valtype)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, (elemtype : reftype <: valtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(dt : deftype <: typeuse)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype(dt : deftype <: typeuse),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global#2*{global#2 <- `global*`}, mem#5*{mem#5 <- `mem*`}, table#5*{table#5 <- `table*`}, elem#5*{elem#5 <- `elem*`}, export#6*{export#6 <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global#3*{global#3 <- `global*`},), `%`_list(mem#6*{mem#6 <- `mem*`},), `%`_list(table#6*{table#6 <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem#6*{elem#6 <- `elem*`},), ?(), `%`_list(export#7*{export#7 <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- if (|`import*`| = |`xt_I*`|) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- if (|`jt*`| = |`tag*`|) + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- if (|`mem*`| = |`mt*`|) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- if (|`table*`| = |`tt*`|) + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- if (|`dt*`| = |`func*`|) + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- if (|`data*`| = |`ok*`|) + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- if (|`elem*`| = |`rt*`|) + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- if (|`export*`| = |`nm*`|) + -- if (|`export*`| = |`xt_E*`|) + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(BOT_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(V128_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I8_storagetype) = ?(S_sx) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I16_storagetype) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I32_lanetype) = mk_lane__2_lane_(I32_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((I32_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I32_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I64_lanetype) = mk_lane__2_lane_(I64_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((I64_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I64_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I8_lanetype) = mk_lane__2_lane_(I8_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((I8_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I8_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I16_lanetype) = mk_lane__2_lane_(I16_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`((I16_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I16_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F32_lanetype) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $fzero($size((F32_Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((F32_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $fzero($size((F32_Fnn : Fnn <: numtype)))))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F64_lanetype) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $fzero($size((F64_Fnn : Fnn <: numtype))))) + -- wf_lane_: `%%`((F64_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $fzero($size((F64_Fnn : Fnn <: numtype)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I32_lanetype, c) = mk_lane__0_lane_(I32_numtype, c) + -- wf_lane_: `%%`((I32_numtype : numtype <: lanetype), mk_lane__0_lane_(I32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I64_lanetype, c) = mk_lane__0_lane_(I64_numtype, c) + -- wf_lane_: `%%`((I64_numtype : numtype <: lanetype), mk_lane__0_lane_(I64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F32_lanetype, c) = mk_lane__0_lane_(F32_numtype, c) + -- wf_lane_: `%%`((F32_numtype : numtype <: lanetype), mk_lane__0_lane_(F32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F64_lanetype, c) = mk_lane__0_lane_(F64_numtype, c) + -- wf_lane_: `%%`((F64_numtype : numtype <: lanetype), mk_lane__0_lane_(F64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I8_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack((I8_packtype : packtype <: lanetype))), $psize(I8_packtype), c)) + -- wf_lane_: `%%`((I8_packtype : packtype <: lanetype), mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack((I8_packtype : packtype <: lanetype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I16_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack((I16_packtype : packtype <: lanetype))), $psize(I16_packtype), c)) + -- wf_lane_: `%%`((I16_packtype : packtype <: lanetype), mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack((I16_packtype : packtype <: lanetype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I8_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack((I8_packtype : packtype <: lanetype))), $psize(I8_packtype), c)) + -- wf_lit_: `%%`((I8_packtype : packtype <: storagetype), mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack((I8_packtype : packtype <: lanetype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I16_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack((I16_packtype : packtype <: lanetype))), $psize(I16_packtype), c)) + -- wf_lit_: `%%`((I16_packtype : packtype <: storagetype), mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack((I16_packtype : packtype <: lanetype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I32_lanetype, mk_lane__0_lane_(I32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I64_lanetype, mk_lane__0_lane_(I64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F32_lanetype, mk_lane__0_lane_(F32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F64_lanetype, mk_lane__0_lane_(F64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I8_lanetype, mk_lane__1_lane_(I8_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack((I8_packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((I8_packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack((I8_packtype : packtype <: lanetype))), U_sx, c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I16_lanetype, mk_lane__1_lane_(I16_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack((I16_packtype : packtype <: lanetype))), U_sx, c)) + -- wf_num_: `%%`($lunpack((I16_packtype : packtype <: lanetype)), mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack((I16_packtype : packtype <: lanetype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I8_storagetype, mk_lit__2_lit_(I8_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack((I8_packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((I8_packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack((I8_packtype : packtype <: lanetype))), U_sx, c)))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I16_storagetype, mk_lit__2_lit_(I16_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack((I16_packtype : packtype <: lanetype))), U_sx, c))) + -- wf_lit_: `%%`((!($cunpack((I16_packtype : packtype <: storagetype))) : consttype <: storagetype), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack((I16_packtype : packtype <: lanetype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iclz_($sizenn((I32_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $iclz_($sizenn((I32_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iclz_($sizenn((I64_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $iclz_($sizenn((I64_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ictz_($sizenn((I32_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ictz_($sizenn((I32_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ictz_($sizenn((I64_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ictz_($sizenn((I64_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn((I32_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn((I32_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn((I64_Inn : addrtype <: numtype)), i))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn((I64_Inn : addrtype <: numtype)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iextend_($sizenn((I32_Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $iextend_($sizenn((I32_Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iextend_($sizenn((I64_Inn : addrtype <: numtype)), N', S_sx, i))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $iextend_($sizenn((I64_Inn : addrtype <: numtype)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#2)*{iter_0#2 <- $fabs_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#1)))*{iter_0#1 <- $fabs_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#4)*{iter_0#4 <- $fabs_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#3)))*{iter_0#3 <- $fabs_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#6)*{iter_0#6 <- $fneg_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#5)))*{iter_0#5 <- $fneg_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#8)*{iter_0#8 <- $fneg_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#7)))*{iter_0#7 <- $fneg_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#10)*{iter_0#10 <- $fsqrt_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#9)))*{iter_0#9 <- $fsqrt_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#12)*{iter_0#12 <- $fsqrt_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#11)))*{iter_0#11 <- $fsqrt_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#14)*{iter_0#14 <- $fceil_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#13)))*{iter_0#13 <- $fceil_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#16)*{iter_0#16 <- $fceil_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#15)))*{iter_0#15 <- $fceil_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#18)*{iter_0#18 <- $ffloor_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#17)))*{iter_0#17 <- $ffloor_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#20)*{iter_0#20 <- $ffloor_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#19)))*{iter_0#19 <- $ffloor_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#22)*{iter_0#22 <- $ftrunc_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#21)))*{iter_0#21 <- $ftrunc_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#24)*{iter_0#24 <- $ftrunc_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#23)))*{iter_0#23 <- $ftrunc_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#26)*{iter_0#26 <- $fnearest_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#25)))*{iter_0#25 <- $fnearest_($sizenn((F32_Fnn : Fnn <: numtype)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#28)*{iter_0#28 <- $fnearest_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#27)))*{iter_0#27 <- $fnearest_($sizenn((F64_Fnn : Fnn <: numtype)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iadd_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $iadd_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iadd_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $iadd_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $isub_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $isub_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $isub_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $isub_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $imul_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $imul_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $imul_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $imul_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#30)*{iter_0#30 <- lift($idiv_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#29)))*{iter_0#29 <- lift($idiv_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#32)*{iter_0#32 <- lift($idiv_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#31)))*{iter_0#31 <- lift($idiv_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#34)*{iter_0#34 <- lift($irem_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#33)))*{iter_0#33 <- lift($irem_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#36)*{iter_0#36 <- lift($irem_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#35)))*{iter_0#35 <- lift($irem_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iand_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $iand_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iand_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $iand_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ior_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ior_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ior_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ior_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ixor_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ixor_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ixor_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ixor_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishl_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ishl_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishl_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ishl_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishr_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $ishr_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishr_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $ishr_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotl_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $irotl_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotl_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $irotl_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotr_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $irotr_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotr_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $irotr_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#38)*{iter_0#38 <- $fadd_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#37)))*{iter_0#37 <- $fadd_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#40)*{iter_0#40 <- $fadd_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#39)))*{iter_0#39 <- $fadd_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#42)*{iter_0#42 <- $fsub_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#41)))*{iter_0#41 <- $fsub_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#44)*{iter_0#44 <- $fsub_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#43)))*{iter_0#43 <- $fsub_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#46)*{iter_0#46 <- $fmul_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#45)))*{iter_0#45 <- $fmul_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#48)*{iter_0#48 <- $fmul_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#47)))*{iter_0#47 <- $fmul_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#50)*{iter_0#50 <- $fdiv_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#49)))*{iter_0#49 <- $fdiv_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#52)*{iter_0#52 <- $fdiv_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#51)))*{iter_0#51 <- $fdiv_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#54)*{iter_0#54 <- $fmin_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#53)))*{iter_0#53 <- $fmin_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#56)*{iter_0#56 <- $fmin_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#55)))*{iter_0#55 <- $fmin_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#58)*{iter_0#58 <- $fmax_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#57)))*{iter_0#57 <- $fmax_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#60)*{iter_0#60 <- $fmax_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#59)))*{iter_0#59 <- $fmax_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#62)*{iter_0#62 <- $fcopysign_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#61)))*{iter_0#61 <- $fcopysign_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#64)*{iter_0#64 <- $fcopysign_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#63)))*{iter_0#63 <- $fcopysign_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn), mk_num__0_num_(I32_Inn, i)) = $ieqz_($sizenn((I32_Inn : addrtype <: numtype)), i) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn), mk_num__0_num_(I64_Inn, i)) = $ieqz_($sizenn((I64_Inn : addrtype <: numtype)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ieq_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ieq_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ine_($sizenn((I32_Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ine_($sizenn((I64_Inn : addrtype <: numtype)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ilt_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ilt_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $igt_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $igt_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ile_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ile_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ige_($sizenn((I32_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ige_($sizenn((I64_Inn : addrtype <: numtype)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $feq_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $feq_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fne_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fne_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $flt_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $flt_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fgt_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fgt_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fle_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fle_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fge_($sizenn((F32_Fnn : Fnn <: numtype)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fge_($sizenn((F64_Fnn : Fnn <: numtype)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $extend__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $extend__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $extend__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, i_1))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $extend__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $wrap__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, $wrap__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $wrap__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), i_1))] + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, $wrap__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#66)*{iter_0#66 <- lift($trunc__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#65)))*{iter_0#65 <- lift($trunc__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#68)*{iter_0#68 <- lift($trunc__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#67)))*{iter_0#67 <- lift($trunc__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#70)*{iter_0#70 <- lift($trunc__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#69)))*{iter_0#69 <- lift($trunc__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#72)*{iter_0#72 <- lift($trunc__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#71)))*{iter_0#71 <- lift($trunc__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#74)*{iter_0#74 <- lift($trunc_sat__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#73)))*{iter_0#73 <- lift($trunc_sat__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#76)*{iter_0#76 <- lift($trunc_sat__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, iter_0#75)))*{iter_0#75 <- lift($trunc_sat__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I32_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#78)*{iter_0#78 <- lift($trunc_sat__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#77)))*{iter_0#77 <- lift($trunc_sat__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#80)*{iter_0#80 <- lift($trunc_sat__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + -- (wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, iter_0#79)))*{iter_0#79 <- lift($trunc_sat__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((I64_Inn : addrtype <: numtype)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $convert__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, $convert__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $convert__($sizenn1((I32_Inn : addrtype <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), sx, i_1))] + -- wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, $convert__($sizenn1((I64_Inn : addrtype <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#82)*{iter_0#82 <- $promote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#81)))*{iter_0#81 <- $promote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#84)*{iter_0#84 <- $promote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#83)))*{iter_0#83 <- $promote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#86)*{iter_0#86 <- $promote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#85)))*{iter_0#85 <- $promote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#88)*{iter_0#88 <- $promote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#87)))*{iter_0#87 <- $promote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#90)*{iter_0#90 <- $demote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#89)))*{iter_0#89 <- $demote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#92)*{iter_0#92 <- $demote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#91)))*{iter_0#91 <- $demote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F32_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#94)*{iter_0#94 <- $demote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#93)))*{iter_0#93 <- $demote__($sizenn1((F32_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#96)*{iter_0#96 <- $demote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + -- (wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#95)))*{iter_0#95 <- $demote__($sizenn1((F64_Fnn : Fnn <: numtype)), $sizenn2((F64_Fnn : Fnn <: numtype)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__((I32_Inn : addrtype <: numtype), (F32_Fnn : Fnn <: numtype), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size((I32_Inn : addrtype <: numtype)) = $size((F32_Fnn : Fnn <: numtype))) + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__((I64_Inn : addrtype <: numtype), (F32_Fnn : Fnn <: numtype), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size((I64_Inn : addrtype <: numtype)) = $size((F32_Fnn : Fnn <: numtype))) + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__((I32_Inn : addrtype <: numtype), (F64_Fnn : Fnn <: numtype), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size((I32_Inn : addrtype <: numtype)) = $size((F64_Fnn : Fnn <: numtype))) + -- wf_num_: `%%`((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__((I64_Inn : addrtype <: numtype), (F64_Fnn : Fnn <: numtype), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size((I64_Inn : addrtype <: numtype)) = $size((F64_Fnn : Fnn <: numtype))) + -- wf_num_: `%%`((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__((F32_Fnn : Fnn <: numtype), (I32_Inn : addrtype <: numtype), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size((F32_Fnn : Fnn <: numtype)) = $size((I32_Inn : addrtype <: numtype))) + -- wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__((F64_Fnn : Fnn <: numtype), (I32_Inn : addrtype <: numtype), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size((F64_Fnn : Fnn <: numtype)) = $size((I32_Inn : addrtype <: numtype))) + -- wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__((F32_Fnn : Fnn <: numtype), (I64_Inn : addrtype <: numtype), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size((F32_Fnn : Fnn <: numtype)) = $size((I64_Inn : addrtype <: numtype))) + -- wf_num_: `%%`((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__((F64_Fnn : Fnn <: numtype), (I64_Inn : addrtype <: numtype), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size((F64_Fnn : Fnn <: numtype)) = $size((I64_Inn : addrtype <: numtype))) + -- wf_num_: `%%`((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2753?{half#2753 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2755?{half#2755 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2757?{half#2757 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2759?{half#2759 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2761?{half#2761 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2763?{half#2763 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2765?{half#2765 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2767?{half#2767 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2753?{zero#2753 <- `zero?`}))) = zero#2754?{zero#2754 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2756?{zero#2756 <- `zero?`}))) = zero#2757?{zero#2757 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2759?{zero#2759 <- `zero?`}))) = zero#2760?{zero#2760 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2762?{zero#2762 <- `zero?`}))) = zero#2763?{zero#2763 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2765?{zero#2765 <- `zero?`}))) = zero#2766?{zero#2766 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2768?{zero#2768 <- `zero?`}))) = zero#2769?{zero#2769 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2771?{zero#2771 <- `zero?`}))) = zero#2772?{zero#2772 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2774?{zero#2774 <- `zero?`}))) = zero#2775?{zero#2775 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2777?{zero#2777 <- `zero?`}))) = zero#2778?{zero#2778 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2780?{zero#2780 <- `zero?`}))) = zero#2781?{zero#2781 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2783?{zero#2783 <- `zero?`}))) = zero#2784?{zero#2784 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2786?{zero#2786 <- `zero?`}))) = zero#2787?{zero#2787 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2789?{zero#2789 <- `zero?`}))) = zero#2790?{zero#2790 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2792?{zero#2792 <- `zero?`}))) = zero#2793?{zero#2793 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2795?{zero#2795 <- `zero?`}))) = zero#2796?{zero#2796 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2798?{zero#2798 <- `zero?`}))) = zero#2799?{zero#2799 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2801?{half#2801 <- `half?`}, sx))) = half#2802?{half#2802 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2804?{half#2804 <- `half?`}, sx))) = half#2805?{half#2805 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2807?{half#2807 <- `half?`}, sx))) = half#2808?{half#2808 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2810?{half#2810 <- `half?`}, sx))) = half#2811?{half#2811 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2813?{half#2813 <- `half?`}, sx))) = half#2814?{half#2814 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2816?{half#2816 <- `half?`}, sx))) = half#2817?{half#2817 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2819?{half#2819 <- `half?`}, sx))) = half#2820?{half#2820 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2822?{half#2822 <- `half?`}, sx))) = half#2823?{half#2823 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2801?{zero#2801 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2803?{zero#2803 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2805?{zero#2805 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2807?{zero#2807 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2809?{zero#2809 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2811?{zero#2811 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2813?{zero#2813 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2815?{zero#2815 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2817?{zero#2817 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2819?{zero#2819 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2821?{zero#2821 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2823?{zero#2823 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2825?{zero#2825 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2827?{zero#2827 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2829?{zero#2829 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2831?{zero#2831 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#1*{c#1 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#2*{c#2 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else (if ($signed_(N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[($proj_uN_0(i).0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#5)*{c#5 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#1*{c_1#1 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#3*{c#3 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#2)))*{c_1#2 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#4)))*{c#4 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#8)*{c#8 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#3*{c_1#3 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#6*{c#6 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#4)))*{c_1#4 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#7)))*{c#7 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#11)*{c#11 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#5*{c_1#5 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#9*{c#9 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#6)))*{c_1#6 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#10)))*{c#10 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#14)*{c#14 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#7*{c_1#7 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#12*{c#12 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#8)))*{c_1#8 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#13)))*{c#13 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#17)))*{c#17 <- `c*#3`})*{`c*#3` <- `c**`} + -- let{`c_1*` : lane_*} c_1#9*{c_1#9 <- `c_1*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c#15*{c#15 <- `c*#1`}*{`c*#1` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#97))*{iter_0#97 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#10)))))}*{c_1#10 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#16)))))*{c#16 <- `c*#2`}*{`c*#2` <- `c**`} + -- (wf_lane_: `%%`((F32_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#98))))*{iter_0#98 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#11)))))}*{c_1#11 <- `c_1*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#20)))*{c#20 <- `c*#6`})*{`c*#6` <- `c**`} + -- let{`c_1*` : lane_*} c_1#12*{c_1#12 <- `c_1*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c**` : lane_**} c#18*{c#18 <- `c*#4`}*{`c*#4` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#99))*{iter_0#99 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#13)))))}*{c_1#13 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#19)))))*{c#19 <- `c*#5`}*{`c*#5` <- `c**`} + -- (wf_lane_: `%%`((F64_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#100))))*{iter_0#100 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#14)))))}*{c_1#14 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#23)*{c#23 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#15*{c_1#15 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#1*{c_2#1 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#21*{c#21 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#16)), !($proj_lane__2(c_2#2)))*{c_1#16 <- `c_1*`, c_2#2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#22)))*{c#22 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#26)*{c#26 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#17*{c_1#17 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#3*{c_2#3 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#24*{c#24 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#18)), !($proj_lane__2(c_2#4)))*{c_1#18 <- `c_1*`, c_2#4 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#25)))*{c#25 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#29)*{c#29 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#19*{c_1#19 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#5*{c_2#5 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#27*{c#27 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#20)), !($proj_lane__2(c_2#6)))*{c_1#20 <- `c_1*`, c_2#6 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#28)))*{c#28 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#32)*{c#32 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#21*{c_1#21 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#7*{c_2#7 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#30*{c#30 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#22)), !($proj_lane__2(c_2#8)))*{c_1#22 <- `c_1*`, c_2#8 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#31)))*{c#31 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#35)*{c#35 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#23*{c_1#23 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#9*{c_2#9 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#33*{c#33 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#24)), !($proj_lane__2(c_2#10)))*{c_1#24 <- `c_1*`, c_2#10 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#34)))*{c#34 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#38)*{c#38 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#25*{c_1#25 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#11*{c_2#11 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#36*{c#36 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#26)), !($proj_lane__2(c_2#12)))*{c_1#26 <- `c_1*`, c_2#12 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#37)))*{c#37 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#41)*{c#41 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#27*{c_1#27 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#13*{c_2#13 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#39*{c#39 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#28)), !($proj_lane__2(c_2#14)))*{c_1#28 <- `c_1*`, c_2#14 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#40)))*{c#40 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#44)*{c#44 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#29*{c_1#29 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#15*{c_2#15 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#42*{c#42 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#30)), !($proj_lane__2(c_2#16)))*{c_1#30 <- `c_1*`, c_2#16 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#43)))*{c#43 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#47)))*{c#47 <- `c*#9`})*{`c*#9` <- `c**`} + -- let{`c_1*` : lane_*} c_1#31*{c_1#31 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#17*{c_2#17 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#45*{c#45 <- `c*#7`}*{`c*#7` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#101)*{iter_0#101 <- $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#32)), !($proj_lane__2(c_2#18)))}*{c_1#32 <- `c_1*`, c_2#18 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#46)))))*{c#46 <- `c*#8`}*{`c*#8` <- `c**`} + -- (wf_lane_: `%%`((I32_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I32_Jnn, iter_0#102)))*{iter_0#102 <- $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#33)), !($proj_lane__2(c_2#19)))}*{c_1#33 <- `c_1*`, c_2#19 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#50)))*{c#50 <- `c*#12`})*{`c*#12` <- `c**`} + -- let{`c_1*` : lane_*} c_1#34*{c_1#34 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#20*{c_2#20 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#48*{c#48 <- `c*#10`}*{`c*#10` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#103)*{iter_0#103 <- $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#35)), !($proj_lane__2(c_2#21)))}*{c_1#35 <- `c_1*`, c_2#21 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#49)))))*{c#49 <- `c*#11`}*{`c*#11` <- `c**`} + -- (wf_lane_: `%%`((I64_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I64_Jnn, iter_0#104)))*{iter_0#104 <- $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#36)), !($proj_lane__2(c_2#22)))}*{c_1#36 <- `c_1*`, c_2#22 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#53)))*{c#53 <- `c*#15`})*{`c*#15` <- `c**`} + -- let{`c_1*` : lane_*} c_1#37*{c_1#37 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#23*{c_2#23 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#51*{c#51 <- `c*#13`}*{`c*#13` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#105)*{iter_0#105 <- $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#38)), !($proj_lane__2(c_2#24)))}*{c_1#38 <- `c_1*`, c_2#24 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#52)))))*{c#52 <- `c*#14`}*{`c*#14` <- `c**`} + -- (wf_lane_: `%%`((I8_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I8_Jnn, iter_0#106)))*{iter_0#106 <- $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#39)), !($proj_lane__2(c_2#25)))}*{c_1#39 <- `c_1*`, c_2#25 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#56)))*{c#56 <- `c*#18`})*{`c*#18` <- `c**`} + -- let{`c_1*` : lane_*} c_1#40*{c_1#40 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#26*{c_2#26 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#54*{c#54 <- `c*#16`}*{`c*#16` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#107)*{iter_0#107 <- $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#41)), !($proj_lane__2(c_2#27)))}*{c_1#41 <- `c_1*`, c_2#27 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#55)))))*{c#55 <- `c*#17`}*{`c*#17` <- `c**`} + -- (wf_lane_: `%%`((I16_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I16_Jnn, iter_0#108)))*{iter_0#108 <- $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#42)), !($proj_lane__2(c_2#28)))}*{c_1#42 <- `c_1*`, c_2#28 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#59)))*{c#59 <- `c*#21`})*{`c*#21` <- `c**`} + -- let{`c_1*` : lane_*} c_1#43*{c_1#43 <- `c_1*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#29*{c_2#29 <- `c_2*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#57*{c#57 <- `c*#19`}*{`c*#19` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#109))*{iter_0#109 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#44)))), !($proj_num__1(!($proj_lane__0(c_2#30)))))}*{c_1#44 <- `c_1*`, c_2#30 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#58)))))*{c#58 <- `c*#20`}*{`c*#20` <- `c**`} + -- (wf_lane_: `%%`((F32_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#110))))*{iter_0#110 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#45)))), !($proj_num__1(!($proj_lane__0(c_2#31)))))}*{c_1#45 <- `c_1*`, c_2#31 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#62)))*{c#62 <- `c*#24`})*{`c*#24` <- `c**`} + -- let{`c_1*` : lane_*} c_1#46*{c_1#46 <- `c_1*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#32*{c_2#32 <- `c_2*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c**` : lane_**} c#60*{c#60 <- `c*#22`}*{`c*#22` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#111))*{iter_0#111 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#47)))), !($proj_num__1(!($proj_lane__0(c_2#33)))))}*{c_1#47 <- `c_1*`, c_2#33 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#61)))))*{c#61 <- `c*#23`}*{`c*#23` <- `c**`} + -- (wf_lane_: `%%`((F64_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#112))))*{iter_0#112 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#48)))), !($proj_num__1(!($proj_lane__0(c_2#34)))))}*{c_1#48 <- `c_1*`, c_2#34 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#65)))*{c#65 <- `c*#27`})*{`c*#27` <- `c**`} + -- let{`c_1*` : lane_*} c_1#49*{c_1#49 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#35*{c_2#35 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#1*{c_3#1 <- `c_3*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#63*{c#63 <- `c*#25`}*{`c*#25` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#113)*{iter_0#113 <- $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#50)), !($proj_lane__2(c_2#36)), !($proj_lane__2(c_3#2)))}*{c_1#50 <- `c_1*`, c_2#36 <- `c_2*`, c_3#2 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#64)))))*{c#64 <- `c*#26`}*{`c*#26` <- `c**`} + -- (wf_lane_: `%%`((I32_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I32_Jnn, iter_0#114)))*{iter_0#114 <- $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#51)), !($proj_lane__2(c_2#37)), !($proj_lane__2(c_3#3)))}*{c_1#51 <- `c_1*`, c_2#37 <- `c_2*`, c_3#3 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#68)))*{c#68 <- `c*#30`})*{`c*#30` <- `c**`} + -- let{`c_1*` : lane_*} c_1#52*{c_1#52 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#38*{c_2#38 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#4*{c_3#4 <- `c_3*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#66*{c#66 <- `c*#28`}*{`c*#28` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#115)*{iter_0#115 <- $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#53)), !($proj_lane__2(c_2#39)), !($proj_lane__2(c_3#5)))}*{c_1#53 <- `c_1*`, c_2#39 <- `c_2*`, c_3#5 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#67)))))*{c#67 <- `c*#29`}*{`c*#29` <- `c**`} + -- (wf_lane_: `%%`((I64_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I64_Jnn, iter_0#116)))*{iter_0#116 <- $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#54)), !($proj_lane__2(c_2#40)), !($proj_lane__2(c_3#6)))}*{c_1#54 <- `c_1*`, c_2#40 <- `c_2*`, c_3#6 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#71)))*{c#71 <- `c*#33`})*{`c*#33` <- `c**`} + -- let{`c_1*` : lane_*} c_1#55*{c_1#55 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#41*{c_2#41 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#7*{c_3#7 <- `c_3*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#69*{c#69 <- `c*#31`}*{`c*#31` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#117)*{iter_0#117 <- $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#56)), !($proj_lane__2(c_2#42)), !($proj_lane__2(c_3#8)))}*{c_1#56 <- `c_1*`, c_2#42 <- `c_2*`, c_3#8 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#70)))))*{c#70 <- `c*#32`}*{`c*#32` <- `c**`} + -- (wf_lane_: `%%`((I8_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I8_Jnn, iter_0#118)))*{iter_0#118 <- $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#57)), !($proj_lane__2(c_2#43)), !($proj_lane__2(c_3#9)))}*{c_1#57 <- `c_1*`, c_2#43 <- `c_2*`, c_3#9 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#74)))*{c#74 <- `c*#36`})*{`c*#36` <- `c**`} + -- let{`c_1*` : lane_*} c_1#58*{c_1#58 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#44*{c_2#44 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#10*{c_3#10 <- `c_3*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#72*{c#72 <- `c*#34`}*{`c*#34` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#119)*{iter_0#119 <- $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#59)), !($proj_lane__2(c_2#45)), !($proj_lane__2(c_3#11)))}*{c_1#59 <- `c_1*`, c_2#45 <- `c_2*`, c_3#11 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#73)))))*{c#73 <- `c*#35`}*{`c*#35` <- `c**`} + -- (wf_lane_: `%%`((I16_Jnn : Jnn <: lanetype), mk_lane__2_lane_(I16_Jnn, iter_0#120)))*{iter_0#120 <- $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#60)), !($proj_lane__2(c_2#46)), !($proj_lane__2(c_3#12)))}*{c_1#60 <- `c_1*`, c_2#46 <- `c_2*`, c_3#12 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#77)))*{c#77 <- `c*#39`})*{`c*#39` <- `c**`} + -- let{`c_1*` : lane_*} c_1#61*{c_1#61 <- `c_1*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#47*{c_2#47 <- `c_2*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#13*{c_3#13 <- `c_3*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#75*{c#75 <- `c*#37`}*{`c*#37` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#121))*{iter_0#121 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#62)))), !($proj_num__1(!($proj_lane__0(c_2#48)))), !($proj_num__1(!($proj_lane__0(c_3#14)))))}*{c_1#62 <- `c_1*`, c_2#48 <- `c_2*`, c_3#14 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), !($proj_lane__0(c#76)))))*{c#76 <- `c*#38`}*{`c*#38` <- `c**`} + -- (wf_lane_: `%%`((F32_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, iter_0#122))))*{iter_0#122 <- $f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#63)))), !($proj_num__1(!($proj_lane__0(c_2#49)))), !($proj_num__1(!($proj_lane__0(c_3#15)))))}*{c_1#63 <- `c_1*`, c_2#49 <- `c_2*`, c_3#15 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#80)))*{c#80 <- `c*#42`})*{`c*#42` <- `c**`} + -- let{`c_1*` : lane_*} c_1#64*{c_1#64 <- `c_1*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#50*{c_2#50 <- `c_2*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c_3*` : lane_*} c_3#16*{c_3#16 <- `c_3*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_3) + -- let{`c**` : lane_**} c#78*{c#78 <- `c*#40`}*{`c*#40` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#123))*{iter_0#123 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#65)))), !($proj_num__1(!($proj_lane__0(c_2#51)))), !($proj_num__1(!($proj_lane__0(c_3#17)))))}*{c_1#65 <- `c_1*`, c_2#51 <- `c_2*`, c_3#17 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), !($proj_lane__0(c#79)))))*{c#79 <- `c*#41`}*{`c*#41` <- `c**`} + -- (wf_lane_: `%%`((F64_Fnn : Fnn <: lanetype), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, iter_0#124))))*{iter_0#124 <- $f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#66)))), !($proj_num__1(!($proj_lane__0(c_2#52)))), !($proj_num__1(!($proj_lane__0(c_3#18)))))}*{c_1#66 <- `c_1*`, c_2#52 <- `c_2*`, c_3#18 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#83)*{c#83 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#67*{c_1#67 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#53*{c_2#53 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#81*{c#81 <- `c*`} = $extend__(1, $lsizenn((I32_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#68)), !($proj_lane__2(c_2#54)))).0,))*{c_1#68 <- `c_1*`, c_2#54 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#82)))*{c#82 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#69)), !($proj_lane__2(c_2#55)))).0,)))*{c_1#69 <- `c_1*`, c_2#55 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#86)*{c#86 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#70*{c_1#70 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#56*{c_2#56 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#84*{c#84 <- `c*`} = $extend__(1, $lsizenn((I64_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#71)), !($proj_lane__2(c_2#57)))).0,))*{c_1#71 <- `c_1*`, c_2#57 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#85)))*{c#85 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#72)), !($proj_lane__2(c_2#58)))).0,)))*{c_1#72 <- `c_1*`, c_2#58 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#89)*{c#89 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#73*{c_1#73 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#59*{c_2#59 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#87*{c#87 <- `c*`} = $extend__(1, $lsizenn((I8_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#74)), !($proj_lane__2(c_2#60)))).0,))*{c_1#74 <- `c_1*`, c_2#60 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#88)))*{c#88 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#75)), !($proj_lane__2(c_2#61)))).0,)))*{c_1#75 <- `c_1*`, c_2#61 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#92)*{c#92 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#76*{c_1#76 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#62*{c_2#62 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#90*{c#90 <- `c*`} = $extend__(1, $lsizenn((I16_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#77)), !($proj_lane__2(c_2#63)))).0,))*{c_1#77 <- `c_1*`, c_2#63 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#91)))*{c#91 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#78)), !($proj_lane__2(c_2#64)))).0,)))*{c_1#78 <- `c_1*`, c_2#64 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#95)*{c#95 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#79*{c_1#79 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#65*{c_2#65 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#93*{c#93 <- `c*`} = $extend__(1, $lsizenn((I32_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#80)), !($proj_lane__2(c_2#66)))).0,))*{c_1#80 <- `c_1*`, c_2#66 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#94)))*{c#94 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#81)), !($proj_lane__2(c_2#67)))).0,)))*{c_1#81 <- `c_1*`, c_2#67 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#98)*{c#98 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#82*{c_1#82 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#68*{c_2#68 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#96*{c#96 <- `c*`} = $extend__(1, $lsizenn((I64_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#83)), !($proj_lane__2(c_2#69)))).0,))*{c_1#83 <- `c_1*`, c_2#69 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#97)))*{c#97 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#84)), !($proj_lane__2(c_2#70)))).0,)))*{c_1#84 <- `c_1*`, c_2#70 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#101)*{c#101 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#85*{c_1#85 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#71*{c_2#71 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#99*{c#99 <- `c*`} = $extend__(1, $lsizenn((I8_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#86)), !($proj_lane__2(c_2#72)))).0,))*{c_1#86 <- `c_1*`, c_2#72 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#100)))*{c#100 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#87)), !($proj_lane__2(c_2#73)))).0,)))*{c_1#87 <- `c_1*`, c_2#73 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#104)*{c#104 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#88*{c_1#88 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#74*{c_2#74 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#102*{c#102 <- `c*`} = $extend__(1, $lsizenn((I16_Jnn : Jnn <: lanetype)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#89)), !($proj_lane__2(c_2#75)))).0,))*{c_1#89 <- `c_1*`, c_2#75 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#103)))*{c#103 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#90)), !($proj_lane__2(c_2#76)))).0,)))*{c_1#90 <- `c_1*`, c_2#76 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#107).0,)))*{c#107 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#91*{c_1#91 <- `c_1*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#77*{c_2#77 <- `c_2*`} = $lanes_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#105*{c#105 <- `c*`} = $extend__(1, $sizenn((F32_Fnn : Fnn <: numtype)), S_sx, `%`_iN($proj_uN_0($f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#92)))), !($proj_num__1(!($proj_lane__0(c_2#78)))))).0,))*{c_1#92 <- `c_1*`, c_2#78 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F32_Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#106).0,)))))*{c#106 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn((F32_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#93)))), !($proj_num__1(!($proj_lane__0(c_2#79)))))).0,)))*{c_1#93 <- `c_1*`, c_2#79 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((Inn : addrtype <: lanetype), M), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#110).0,)))*{c#110 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#94*{c_1#94 <- `c_1*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#80*{c_2#80 <- `c_2*`} = $lanes_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#108*{c#108 <- `c*`} = $extend__(1, $sizenn((F64_Fnn : Fnn <: numtype)), S_sx, `%`_iN($proj_uN_0($f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#95)))), !($proj_num__1(!($proj_lane__0(c_2#81)))))).0,))*{c_1#95 <- `c_1*`, c_2#81 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F64_Fnn)) + -- wf_shape: `%`(`%X%`_shape((Inn : addrtype <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Inn : addrtype <: lanetype), M)), mk_lane__0_lane_((Inn : addrtype <: numtype), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#109).0,)))))*{c#109 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn((F64_Fnn : Fnn <: numtype)), !($proj_num__1(!($proj_lane__0(c_1#96)))), !($proj_num__1(!($proj_lane__0(c_2#82)))))).0,)))*{c_1#96 <- `c_1*`, c_2#82 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#113)*{c#113 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#97*{c_1#97 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#111*{c#111 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#98)), `%`_iN($proj_uN_0(i).0,))*{c_1#98 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#112)))*{c#112 <- `c*`} + -- wf_uN: `%%`($lsize((I32_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#116)*{c#116 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#99*{c_1#99 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#114*{c#114 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#100)), `%`_iN($proj_uN_0(i).0,))*{c_1#100 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#115)))*{c#115 <- `c*`} + -- wf_uN: `%%`($lsize((I64_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#119)*{c#119 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#101*{c_1#101 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#117*{c#117 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#102)), `%`_iN($proj_uN_0(i).0,))*{c_1#102 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#118)))*{c#118 <- `c*`} + -- wf_uN: `%%`($lsize((I8_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#122)*{c#122 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#103*{c_1#103 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#120*{c#120 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#104)), `%`_iN($proj_uN_0(i).0,))*{c_1#104 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#121)))*{c#121 <- `c*`} + -- wf_uN: `%%`($lsize((I16_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#125)*{c#125 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#105*{c_1#105 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#123*{c#123 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#106)), `%`_iN($proj_uN_0(i).0,))*{c_1#106 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#124)))*{c#124 <- `c*`} + -- wf_uN: `%%`($lsize((I32_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#128)*{c#128 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#107*{c_1#107 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#126*{c#126 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#108)), `%`_iN($proj_uN_0(i).0,))*{c_1#108 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#127)))*{c#127 <- `c*`} + -- wf_uN: `%%`($lsize((I64_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#131)*{c#131 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#109*{c_1#109 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#129*{c#129 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#110)), `%`_iN($proj_uN_0(i).0,))*{c_1#110 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#130)))*{c#130 <- `c*`} + -- wf_uN: `%%`($lsize((I8_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#134)*{c#134 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#111*{c_1#111 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c*` : iN*} c#132*{c#132 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#112)), `%`_iN($proj_uN_0(i).0,))*{c_1#112 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#133)))*{c#133 <- `c*`} + -- wf_uN: `%%`($lsize((I16_Jnn : Jnn <: lanetype)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I32_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#113*{c_1#113 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((I32_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#114)), `%`_iN(0,))).0,)*{c_1#114 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((I32_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#115)), `%`_iN(0,))).0,),))*{c_1#115 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I64_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#116*{c_1#116 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((I64_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#117)), `%`_iN(0,))).0,)*{c_1#117 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((I64_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#118)), `%`_iN(0,))).0,),))*{c_1#118 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I8_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#119*{c_1#119 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((I8_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#120)), `%`_iN(0,))).0,)*{c_1#120 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((I8_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#121)), `%`_iN(0,))).0,),))*{c_1#121 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I16_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#122*{c_1#122 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn((I16_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#123)), `%`_iN(0,))).0,)*{c_1#123 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn((I16_Jnn : Jnn <: lanetype)), S_sx, !($proj_lane__2(c_1#124)), `%`_iN(0,))).0,),))*{c_1#124 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I32_Jnn, c#137)*{c#137 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#125*{c_1#125 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#83*{c_2#83 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#135*{c#135 <- `c*`} = $f_($lsizenn((I32_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#126))*{c_1#126 <- `c_1*`}, !($proj_lane__2(c_2#84)))*{c_2#84 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I32_Jnn, c#136)))*{c#136 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I64_Jnn, c#140)*{c#140 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#127*{c_1#127 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#85*{c_2#85 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#138*{c#138 <- `c*`} = $f_($lsizenn((I64_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#128))*{c_1#128 <- `c_1*`}, !($proj_lane__2(c_2#86)))*{c_2#86 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I64_Jnn, c#139)))*{c#139 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I8_Jnn, c#143)*{c#143 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#129*{c_1#129 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#87*{c_2#87 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#141*{c#141 <- `c*`} = $f_($lsizenn((I8_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#130))*{c_1#130 <- `c_1*`}, !($proj_lane__2(c_2#88)))*{c_2#88 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I8_Jnn, c#142)))*{c#142 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(I16_Jnn, c#146)*{c#146 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#131*{c_1#131 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#89*{c_2#89 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : iN*} c#144*{c#144 <- `c*`} = $f_($lsizenn((I16_Jnn : Jnn <: lanetype)), !($proj_lane__2(c_1#132))*{c_1#132 <- `c_1*`}, !($proj_lane__2(c_2#90)))*{c_2#90 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(I16_Jnn, c#145)))*{c#145 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), i#93310*{i#93310 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), c#148*{c#148 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#133*{c_1#133 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#91*{c_2#91 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c#147*{c#147 <- `c*`} = c_1#134*{c_1#134 <- `c_1*`} ++ c_2#92*{c_2#92 <- `c_2*`}[$proj_uN_0(i#93311).0]*{i#93311 <- `i*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), i#93313*{i#93313 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), c#150*{c#150 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#135*{c_1#135 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#93*{c_2#93 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c#149*{c#149 <- `c*`} = c_1#136*{c_1#136 <- `c_1*`} ++ c_2#94*{c_2#94 <- `c_2*`}[$proj_uN_0(i#93314).0]*{i#93314 <- `i*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), i#93316*{i#93316 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), c#152*{c#152 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#137*{c_1#137 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#95*{c_2#95 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c#151*{c#151 <- `c*`} = c_1#138*{c_1#138 <- `c_1*`} ++ c_2#96*{c_2#96 <- `c_2*`}[$proj_uN_0(i#93317).0]*{i#93317 <- `i*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), i#93319*{i#93319 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), c#154*{c#154 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#139*{c_1#139 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_1) + -- let{`c_2*` : lane_*} c_2#97*{c_2#97 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v_2) + -- let{`c*` : lane_*} c#153*{c#153 <- `c*`} = c_1#140*{c_1#140 <- `c_1*`} ++ c_2#98*{c_2#98 <- `c_2*`}[$proj_uN_0(i#93320).0]*{i#93320 <- `i*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), mk_vternop__0_vternop_(I32_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), mk_vternop__0_vternop_(I64_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), mk_vternop__0_vternop_(I8_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), mk_vternop__0_vternop_(I16_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2857?{half#2857 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2859?{half#2859 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2861?{half#2861 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2863?{half#2863 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2865?{half#2865 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2867?{half#2867 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2869?{half#2869 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2871?{half#2871 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2833?{zero#2833 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#157))?{c#157 <- `c?`}) + -- let{`c?` : iN?} c#155?{c#155 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#156))))?{c#156 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2835?{zero#2835 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#160))?{c#160 <- `c?`}) + -- let{`c?` : iN?} c#158?{c#158 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#159))))?{c#159 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2837?{zero#2837 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#163))?{c#163 <- `c?`}) + -- let{`c?` : iN?} c#161?{c#161 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#162))))?{c#162 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2839?{zero#2839 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#166))?{c#166 <- `c?`}) + -- let{`c?` : iN?} c#164?{c#164 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#165))))?{c#165 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2841?{zero#2841 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#169))?{c#169 <- `c?`}) + -- let{`c?` : iN?} c#167?{c#167 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#168))))?{c#168 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2843?{zero#2843 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#172))?{c#172 <- `c?`}) + -- let{`c?` : iN?} c#170?{c#170 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#171))))?{c#171 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2845?{zero#2845 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#175))?{c#175 <- `c?`}) + -- let{`c?` : iN?} c#173?{c#173 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#174))))?{c#174 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2847?{zero#2847 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#178))?{c#178 <- `c?`}) + -- let{`c?` : iN?} c#176?{c#176 <- `c?`} = $trunc_sat__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#177))))?{c#177 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2849?{zero#2849 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#181))?{c#181 <- `c?`}) + -- let{`c?` : iN?} c#179?{c#179 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#180))))?{c#180 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2851?{zero#2851 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#184))?{c#184 <- `c?`}) + -- let{`c?` : iN?} c#182?{c#182 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#183))))?{c#183 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2853?{zero#2853 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#187))?{c#187 <- `c?`}) + -- let{`c?` : iN?} c#185?{c#185 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#186))))?{c#186 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2855?{zero#2855 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#190))?{c#190 <- `c?`}) + -- let{`c?` : iN?} c#188?{c#188 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#189))))?{c#189 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2857?{zero#2857 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#193))?{c#193 <- `c?`}) + -- let{`c?` : iN?} c#191?{c#191 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#192))))?{c#192 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2859?{zero#2859 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#196))?{c#196 <- `c?`}) + -- let{`c?` : iN?} c#194?{c#194 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#195))))?{c#195 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2861?{zero#2861 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#199))?{c#199 <- `c?`}) + -- let{`c?` : iN?} c#197?{c#197 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#198))))?{c#198 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2863?{zero#2863 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#202))?{c#202 <- `c?`}) + -- let{`c?` : iN?} c#200?{c#200 <- `c?`} = $trunc_sat__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#201))))?{c#201 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2865?{zero#2865 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#205))?{c#205 <- `c?`}) + -- let{`c?` : iN?} c#203?{c#203 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#204))))?{c#204 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2867?{zero#2867 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#208))?{c#208 <- `c?`}) + -- let{`c?` : iN?} c#206?{c#206 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#207))))?{c#207 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2869?{zero#2869 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#211))?{c#211 <- `c?`}) + -- let{`c?` : iN?} c#209?{c#209 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#210))))?{c#210 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2871?{zero#2871 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#214))?{c#214 <- `c?`}) + -- let{`c?` : iN?} c#212?{c#212 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#213))))?{c#213 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2873?{zero#2873 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#217))?{c#217 <- `c?`}) + -- let{`c?` : iN?} c#215?{c#215 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#216))))?{c#216 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2875?{zero#2875 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#220))?{c#220 <- `c?`}) + -- let{`c?` : iN?} c#218?{c#218 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#219))))?{c#219 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2877?{zero#2877 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#223))?{c#223 <- `c?`}) + -- let{`c?` : iN?} c#221?{c#221 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#222))))?{c#222 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2879?{zero#2879 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#226))?{c#226 <- `c?`}) + -- let{`c?` : iN?} c#224?{c#224 <- `c?`} = $relaxed_trunc__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#225))))?{c#225 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2881?{zero#2881 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#229))?{c#229 <- `c?`}) + -- let{`c?` : iN?} c#227?{c#227 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#228))))?{c#228 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2883?{zero#2883 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#232))?{c#232 <- `c?`}) + -- let{`c?` : iN?} c#230?{c#230 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#231))))?{c#231 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2885?{zero#2885 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#235))?{c#235 <- `c?`}) + -- let{`c?` : iN?} c#233?{c#233 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#234))))?{c#234 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2887?{zero#2887 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#238))?{c#238 <- `c?`}) + -- let{`c?` : iN?} c#236?{c#236 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I32_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I32_Inn : addrtype <: numtype), mk_num__0_num_(I32_Inn, c#237))))?{c#237 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2889?{zero#2889 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#241))?{c#241 <- `c?`}) + -- let{`c?` : iN?} c#239?{c#239 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#240))))?{c#240 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2891?{zero#2891 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#244))?{c#244 <- `c?`}) + -- let{`c?` : iN?} c#242?{c#242 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#243))))?{c#243 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2893?{zero#2893 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#247))?{c#247 <- `c?`}) + -- let{`c?` : iN?} c#245?{c#245 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#246))))?{c#246 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2895?{zero#2895 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#250))?{c#250 <- `c?`}) + -- let{`c?` : iN?} c#248?{c#248 <- `c?`} = $relaxed_trunc__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((I64_Inn : addrtype <: lanetype)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Inn : addrtype <: lanetype), M_2)), mk_lane__0_lane_((I64_Inn : addrtype <: numtype), mk_num__0_num_(I64_Inn, c#249))))?{c#249 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#253))*{c#253 <- `c*`} + -- let{`c*` : fN*} c#251*{c#251 <- `c*`} = $demote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#252))))*{c#252 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#256))*{c#256 <- `c*`} + -- let{`c*` : fN*} c#254*{c#254 <- `c*`} = $demote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#255))))*{c#255 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#259))*{c#259 <- `c*`} + -- let{`c*` : fN*} c#257*{c#257 <- `c*`} = $demote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#258))))*{c#258 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#262))*{c#262 <- `c*`} + -- let{`c*` : fN*} c#260*{c#260 <- `c*`} = $demote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#261))))*{c#261 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#265))*{c#265 <- `c*`} + -- let{`c*` : fN*} c#263*{c#263 <- `c*`} = $demote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#264))))*{c#264 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#268))*{c#268 <- `c*`} + -- let{`c*` : fN*} c#266*{c#266 <- `c*`} = $demote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#267))))*{c#267 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#271))*{c#271 <- `c*`} + -- let{`c*` : fN*} c#269*{c#269 <- `c*`} = $demote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#270))))*{c#270 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#274))*{c#274 <- `c*`} + -- let{`c*` : fN*} c#272*{c#272 <- `c*`} = $demote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#273))))*{c#273 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#277))*{c#277 <- `c*`} + -- let{`c*` : fN*} c#275*{c#275 <- `c*`} = $promote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#276))))*{c#276 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#280))*{c#280 <- `c*`} + -- let{`c*` : fN*} c#278*{c#278 <- `c*`} = $promote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#279))))*{c#279 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#283))*{c#283 <- `c*`} + -- let{`c*` : fN*} c#281*{c#281 <- `c*`} = $promote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#282))))*{c#282 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#286))*{c#286 <- `c*`} + -- let{`c*` : fN*} c#284*{c#284 <- `c*`} = $promote__($lsizenn1((F32_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#285))))*{c#285 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#289))*{c#289 <- `c*`} + -- let{`c*` : fN*} c#287*{c#287 <- `c*`} = $promote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#288))))*{c#288 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#292))*{c#292 <- `c*`} + -- let{`c*` : fN*} c#290*{c#290 <- `c*`} = $promote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F32_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F32_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F32_Fnn : Fnn <: numtype), mk_num__1_num_(F32_Fnn, c#291))))*{c#291 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#295))*{c#295 <- `c*`} + -- let{`c*` : fN*} c#293*{c#293 <- `c*`} = $promote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#294))))*{c#294 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#298))*{c#298 <- `c*`} + -- let{`c*` : fN*} c#296*{c#296 <- `c*`} = $promote__($lsizenn1((F64_Fnn : Fnn <: lanetype)), $lsizenn2((F64_Fnn : Fnn <: lanetype)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((F64_Fnn : Fnn <: lanetype), M_2)), mk_lane__0_lane_((F64_Fnn : Fnn <: numtype), mk_num__1_num_(F64_Fnn, c#297))))*{c#297 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1#141*{c_1#141 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c#299*{c#299 <- `c*#43`}*{`c*#43` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1#142)*{c_1#142 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c#300*{c#300 <- `c*#44`})*{`c*#44` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1#143*{c_1#143 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{`c**` : lane_**} c#301*{c#301 <- `c*#45`}*{`c*#45` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#144)*{c_1#144 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#302*{c#302 <- `c*#46`})*{`c*#46` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1#145*{c_1#145 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c#303*{c#303 <- `c*#47`}*{`c*#47` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#146)*{c_1#146 <- `c_1*`} ++ [$zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#304*{c#304 <- `c*#48`})*{`c*#48` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I32_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I32_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I64_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I64_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I8_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I8_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I16_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I16_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I32_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I32_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I64_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I64_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I8_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I8_Jnn : Jnn <: lanetype))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn((I16_Jnn : Jnn <: lanetype))),)) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn((I16_Jnn : Jnn <: lanetype))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M), v) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i#93357*{i#93357 <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#147*{c_1#147 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#99*{c_2#99 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#1*{c'_1#1 <- `c'_1*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#148)))*{c_1#148 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#1*{c'_2#1 <- `c'_2*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#100)))*{c_2#100 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#2)*{c'_1#2 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#2)*{c'_2#2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#3)))*{c'_1#3 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#3)))*{c'_2#3 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#149*{c_1#149 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#101*{c_2#101 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#4*{c'_1#4 <- `c'_1*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#150)))*{c_1#150 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#4*{c'_2#4 <- `c'_2*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#102)))*{c_2#102 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#5)*{c'_1#5 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#5)*{c'_2#5 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#6)))*{c'_1#6 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#6)))*{c'_2#6 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#151*{c_1#151 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#103*{c_2#103 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#7*{c'_1#7 <- `c'_1*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#152)))*{c_1#152 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#7*{c'_2#7 <- `c'_2*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#104)))*{c_2#104 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#8)*{c'_1#8 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#8)*{c'_2#8 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#9)))*{c'_1#9 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#9)))*{c'_2#9 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#153*{c_1#153 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#105*{c_2#105 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#10*{c'_1#10 <- `c'_1*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#154)))*{c_1#154 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#10*{c'_2#10 <- `c'_2*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#106)))*{c_2#106 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#11)*{c'_1#11 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#11)*{c'_2#11 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#12)))*{c'_1#12 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#12)))*{c'_2#12 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#155*{c_1#155 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#107*{c_2#107 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#13*{c'_1#13 <- `c'_1*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#156)))*{c_1#156 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#13*{c'_2#13 <- `c'_2*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#108)))*{c_2#108 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#14)*{c'_1#14 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#14)*{c'_2#14 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#15)))*{c'_1#15 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#15)))*{c'_2#15 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#157*{c_1#157 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#109*{c_2#109 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#16*{c'_1#16 <- `c'_1*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#158)))*{c_1#158 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#16*{c'_2#16 <- `c'_2*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#110)))*{c_2#110 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#17)*{c'_1#17 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#17)*{c'_2#17 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#18)))*{c'_1#18 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#18)))*{c'_2#18 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#159*{c_1#159 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#111*{c_2#111 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#19*{c'_1#19 <- `c'_1*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#160)))*{c_1#160 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#19*{c'_2#19 <- `c'_2*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#112)))*{c_2#112 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#20)*{c'_1#20 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#20)*{c'_2#20 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#21)))*{c'_1#21 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#21)))*{c'_2#21 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#161*{c_1#161 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#113*{c_2#113 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#22*{c'_1#22 <- `c'_1*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#162)))*{c_1#162 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#22*{c'_2#22 <- `c'_2*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#114)))*{c_2#114 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#23)*{c'_1#23 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#23)*{c'_2#23 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#24)))*{c'_1#24 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#24)))*{c'_2#24 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#163*{c_1#163 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#115*{c_2#115 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#25*{c'_1#25 <- `c'_1*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#164)))*{c_1#164 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#25*{c'_2#25 <- `c'_2*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#116)))*{c_2#116 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#26)*{c'_1#26 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#26)*{c'_2#26 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#27)))*{c'_1#27 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#27)))*{c'_2#27 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#165*{c_1#165 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#117*{c_2#117 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#28*{c'_1#28 <- `c'_1*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#166)))*{c_1#166 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#28*{c'_2#28 <- `c'_2*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#118)))*{c_2#118 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#29)*{c'_1#29 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#29)*{c'_2#29 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#30)))*{c'_1#30 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#30)))*{c'_2#30 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#167*{c_1#167 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#119*{c_2#119 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#31*{c'_1#31 <- `c'_1*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#168)))*{c_1#168 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#31*{c'_2#31 <- `c'_2*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#120)))*{c_2#120 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#32)*{c'_1#32 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#32)*{c'_2#32 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#33)))*{c'_1#33 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#33)))*{c'_2#33 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#169*{c_1#169 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#121*{c_2#121 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#34*{c'_1#34 <- `c'_1*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#170)))*{c_1#170 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#34*{c'_2#34 <- `c'_2*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#122)))*{c_2#122 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#35)*{c'_1#35 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#35)*{c'_2#35 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#36)))*{c'_1#36 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#36)))*{c'_2#36 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#171*{c_1#171 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#123*{c_2#123 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#37*{c'_1#37 <- `c'_1*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#172)))*{c_1#172 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#37*{c'_2#37 <- `c'_2*`} = $narrow__($lsize((I32_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#124)))*{c_2#124 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#38)*{c'_1#38 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#38)*{c'_2#38 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#39)))*{c'_1#39 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#39)))*{c'_2#39 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#173*{c_1#173 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#125*{c_2#125 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#40*{c'_1#40 <- `c'_1*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#174)))*{c_1#174 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#40*{c'_2#40 <- `c'_2*`} = $narrow__($lsize((I64_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#126)))*{c_2#126 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#41)*{c'_1#41 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#41)*{c'_2#41 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#42)))*{c'_1#42 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#42)))*{c'_2#42 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#175*{c_1#175 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#127*{c_2#127 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#43*{c'_1#43 <- `c'_1*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#176)))*{c_1#176 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#43*{c'_2#43 <- `c'_2*`} = $narrow__($lsize((I8_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#128)))*{c_2#128 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#44)*{c'_1#44 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#44)*{c'_2#44 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#45)))*{c'_1#45 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#45)))*{c'_2#45 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#177*{c_1#177 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#129*{c_2#129 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#46*{c'_1#46 <- `c'_1*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#178)))*{c_1#178 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#46*{c'_2#46 <- `c'_2*`} = $narrow__($lsize((I16_Jnn : Jnn <: lanetype)), $lsize((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_2#130)))*{c_2#130 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#47)*{c'_1#47 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#47)*{c'_2#47 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#48)))*{c'_1#48 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#48)))*{c'_2#48 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i#93358*{i#93358 <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1#1 j_2#1]*{j_1#1 <- `j_1*`, j_2#1 <- `j_2*`}) = $proj_uN_0(i#93359).0*{i#93359 <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1#2,)))*{j_1#2 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2#2,)))*{j_2#2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#307)*{c#307 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#179*{c_1#179 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#49*{c'_1#49 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#180)))*{c_1#180 <- `c_1*`} + -- let{`c*` : iN*} c#305*{c#305 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#50*{c'_1#50 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#306)))*{c#306 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#310)*{c#310 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#181*{c_1#181 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#51*{c'_1#51 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#182)))*{c_1#182 <- `c_1*`} + -- let{`c*` : iN*} c#308*{c#308 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#52*{c'_1#52 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#309)))*{c#309 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#313)*{c#313 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#183*{c_1#183 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#53*{c'_1#53 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#184)))*{c_1#184 <- `c_1*`} + -- let{`c*` : iN*} c#311*{c#311 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#54*{c'_1#54 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#312)))*{c#312 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#316)*{c#316 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#185*{c_1#185 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#55*{c'_1#55 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#186)))*{c_1#186 <- `c_1*`} + -- let{`c*` : iN*} c#314*{c#314 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#56*{c'_1#56 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#315)))*{c#315 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#319)*{c#319 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#187*{c_1#187 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#57*{c'_1#57 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#188)))*{c_1#188 <- `c_1*`} + -- let{`c*` : iN*} c#317*{c#317 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#58*{c'_1#58 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#318)))*{c#318 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#322)*{c#322 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#189*{c_1#189 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#59*{c'_1#59 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#190)))*{c_1#190 <- `c_1*`} + -- let{`c*` : iN*} c#320*{c#320 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#60*{c'_1#60 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#321)))*{c#321 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#325)*{c#325 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#191*{c_1#191 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#61*{c'_1#61 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#192)))*{c_1#192 <- `c_1*`} + -- let{`c*` : iN*} c#323*{c#323 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#62*{c'_1#62 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#324)))*{c#324 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#328)*{c#328 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#193*{c_1#193 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#63*{c'_1#63 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#194)))*{c_1#194 <- `c_1*`} + -- let{`c*` : iN*} c#326*{c#326 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#64*{c'_1#64 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#327)))*{c#327 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#331)*{c#331 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#195*{c_1#195 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#65*{c'_1#65 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#196)))*{c_1#196 <- `c_1*`} + -- let{`c*` : iN*} c#329*{c#329 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#66*{c'_1#66 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#330)))*{c#330 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#334)*{c#334 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#197*{c_1#197 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#67*{c'_1#67 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#198)))*{c_1#198 <- `c_1*`} + -- let{`c*` : iN*} c#332*{c#332 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#68*{c'_1#68 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#333)))*{c#333 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#337)*{c#337 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#199*{c_1#199 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#69*{c'_1#69 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#200)))*{c_1#200 <- `c_1*`} + -- let{`c*` : iN*} c#335*{c#335 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#70*{c'_1#70 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#336)))*{c#336 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#340)*{c#340 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#201*{c_1#201 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#71*{c'_1#71 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#202)))*{c_1#202 <- `c_1*`} + -- let{`c*` : iN*} c#338*{c#338 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#72*{c'_1#72 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#339)))*{c#339 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#343)*{c#343 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#203*{c_1#203 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#73*{c'_1#73 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#204)))*{c_1#204 <- `c_1*`} + -- let{`c*` : iN*} c#341*{c#341 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#74*{c'_1#74 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#342)))*{c#342 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#346)*{c#346 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#205*{c_1#205 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#75*{c'_1#75 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#206)))*{c_1#206 <- `c_1*`} + -- let{`c*` : iN*} c#344*{c#344 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#76*{c'_1#76 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#345)))*{c#345 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#349)*{c#349 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#207*{c_1#207 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#77*{c'_1#77 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#208)))*{c_1#208 <- `c_1*`} + -- let{`c*` : iN*} c#347*{c#347 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#78*{c'_1#78 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#348)))*{c#348 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#352)*{c#352 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#209*{c_1#209 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#79*{c'_1#79 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx, !($proj_lane__2(c_1#210)))*{c_1#210 <- `c_1*`} + -- let{`c*` : iN*} c#350*{c#350 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#80*{c'_1#80 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#351)))*{c#351 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#1*{i_1#1 <- `i_1*`}, i_2#1*{i_2#1 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#3 j_2#3]*{j_1#3 <- `j_1*`, j_2#3 <- `j_2*`}) = $imul_(N, i_1#2, i_2#2)*{i_1#2 <- `i_1*`, i_2#2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#4))*{j_1#4 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#4))*{j_2#4 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#355)*{c#355 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#211*{c_1#211 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#131*{c_2#131 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#81*{c'_1#81 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#212)))*{c_1#212 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#49*{c'_2#49 <- `c'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#132)))*{c_2#132 <- `c_2*`} + -- let{`c*` : iN*} c#353*{c#353 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#82*{c'_1#82 <- `c'_1*`}, c'_2#50*{c'_2#50 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#354)))*{c#354 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#358)*{c#358 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#213*{c_1#213 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#133*{c_2#133 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#83*{c'_1#83 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#214)))*{c_1#214 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#51*{c'_2#51 <- `c'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#134)))*{c_2#134 <- `c_2*`} + -- let{`c*` : iN*} c#356*{c#356 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#84*{c'_1#84 <- `c'_1*`}, c'_2#52*{c'_2#52 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#357)))*{c#357 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#361)*{c#361 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#215*{c_1#215 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#135*{c_2#135 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#85*{c'_1#85 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#216)))*{c_1#216 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#53*{c'_2#53 <- `c'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#136)))*{c_2#136 <- `c_2*`} + -- let{`c*` : iN*} c#359*{c#359 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#86*{c'_1#86 <- `c'_1*`}, c'_2#54*{c'_2#54 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#360)))*{c#360 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, c#364)*{c#364 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#217*{c_1#217 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#137*{c_2#137 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#87*{c'_1#87 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#218)))*{c_1#218 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#55*{c'_2#55 <- `c'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I32_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#138)))*{c_2#138 <- `c_2*`} + -- let{`c*` : iN*} c#362*{c#362 <- `c*`} = $f_($lsizenn2((I32_Jnn : Jnn <: lanetype)), c'_1#88*{c'_1#88 <- `c'_1*`}, c'_2#56*{c'_2#56 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, c#363)))*{c#363 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#367)*{c#367 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#219*{c_1#219 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#139*{c_2#139 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#89*{c'_1#89 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#220)))*{c_1#220 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#57*{c'_2#57 <- `c'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#140)))*{c_2#140 <- `c_2*`} + -- let{`c*` : iN*} c#365*{c#365 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#90*{c'_1#90 <- `c'_1*`}, c'_2#58*{c'_2#58 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#366)))*{c#366 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#370)*{c#370 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#221*{c_1#221 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#141*{c_2#141 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#91*{c'_1#91 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#222)))*{c_1#222 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#59*{c'_2#59 <- `c'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#142)))*{c_2#142 <- `c_2*`} + -- let{`c*` : iN*} c#368*{c#368 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#92*{c'_1#92 <- `c'_1*`}, c'_2#60*{c'_2#60 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#369)))*{c#369 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#373)*{c#373 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#223*{c_1#223 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#143*{c_2#143 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#93*{c'_1#93 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#224)))*{c_1#224 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#61*{c'_2#61 <- `c'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#144)))*{c_2#144 <- `c_2*`} + -- let{`c*` : iN*} c#371*{c#371 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#94*{c'_1#94 <- `c'_1*`}, c'_2#62*{c'_2#62 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#372)))*{c#372 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, c#376)*{c#376 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#225*{c_1#225 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#145*{c_2#145 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#95*{c'_1#95 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#226)))*{c_1#226 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#63*{c'_2#63 <- `c'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I64_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#146)))*{c_2#146 <- `c_2*`} + -- let{`c*` : iN*} c#374*{c#374 <- `c*`} = $f_($lsizenn2((I64_Jnn : Jnn <: lanetype)), c'_1#96*{c'_1#96 <- `c'_1*`}, c'_2#64*{c'_2#64 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, c#375)))*{c#375 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#379)*{c#379 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#227*{c_1#227 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#147*{c_2#147 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#97*{c'_1#97 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#228)))*{c_1#228 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#65*{c'_2#65 <- `c'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#148)))*{c_2#148 <- `c_2*`} + -- let{`c*` : iN*} c#377*{c#377 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#98*{c'_1#98 <- `c'_1*`}, c'_2#66*{c'_2#66 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#378)))*{c#378 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#382)*{c#382 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#229*{c_1#229 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#149*{c_2#149 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#99*{c'_1#99 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#230)))*{c_1#230 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#67*{c'_2#67 <- `c'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#150)))*{c_2#150 <- `c_2*`} + -- let{`c*` : iN*} c#380*{c#380 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#100*{c'_1#100 <- `c'_1*`}, c'_2#68*{c'_2#68 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#381)))*{c#381 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#385)*{c#385 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#231*{c_1#231 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#151*{c_2#151 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#101*{c'_1#101 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#232)))*{c_1#232 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#69*{c'_2#69 <- `c'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#152)))*{c_2#152 <- `c_2*`} + -- let{`c*` : iN*} c#383*{c#383 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#102*{c'_1#102 <- `c'_1*`}, c'_2#70*{c'_2#70 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#384)))*{c#384 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, c#388)*{c#388 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#233*{c_1#233 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#153*{c_2#153 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#103*{c'_1#103 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#234)))*{c_1#234 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#71*{c'_2#71 <- `c'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I8_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#154)))*{c_2#154 <- `c_2*`} + -- let{`c*` : iN*} c#386*{c#386 <- `c*`} = $f_($lsizenn2((I8_Jnn : Jnn <: lanetype)), c'_1#104*{c'_1#104 <- `c'_1*`}, c'_2#72*{c'_2#72 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, c#387)))*{c#387 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#391)*{c#391 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#235*{c_1#235 <- `c_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#155*{c_2#155 <- `c_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#105*{c'_1#105 <- `c'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#236)))*{c_1#236 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#73*{c'_2#73 <- `c'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#156)))*{c_2#156 <- `c_2*`} + -- let{`c*` : iN*} c#389*{c#389 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#106*{c'_1#106 <- `c'_1*`}, c'_2#74*{c'_2#74 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#390)))*{c#390 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#394)*{c#394 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#237*{c_1#237 <- `c_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#157*{c_2#157 <- `c_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#107*{c'_1#107 <- `c'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#238)))*{c_1#238 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#75*{c'_2#75 <- `c'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#158)))*{c_2#158 <- `c_2*`} + -- let{`c*` : iN*} c#392*{c#392 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#108*{c'_1#108 <- `c'_1*`}, c'_2#76*{c'_2#76 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#393)))*{c#393 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#397)*{c#397 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#239*{c_1#239 <- `c_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#159*{c_2#159 <- `c_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#109*{c'_1#109 <- `c'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#240)))*{c_1#240 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#77*{c'_2#77 <- `c'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#160)))*{c_2#160 <- `c_2*`} + -- let{`c*` : iN*} c#395*{c#395 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#110*{c'_1#110 <- `c'_1*`}, c'_2#78*{c'_2#78 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#396)))*{c#396 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, c#400)*{c#400 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#241*{c_1#241 <- `c_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#161*{c_2#161 <- `c_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#111*{c'_1#111 <- `c'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_1, !($proj_lane__2(c_1#242)))*{c_1#242 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#79*{c'_2#79 <- `c'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), $lsizenn2((I16_Jnn : Jnn <: lanetype)), sx_2, !($proj_lane__2(c_2#162)))*{c_2#162 <- `c_2*`} + -- let{`c*` : iN*} c#398*{c#398 <- `c*`} = $f_($lsizenn2((I16_Jnn : Jnn <: lanetype)), c'_1#112*{c'_1#112 <- `c'_1*`}, c'_2#80*{c'_2#80 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, c#399)))*{c#399 <- `c*`} + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#3*{i_1#3 <- `i_1*`}, i_2#3*{i_2#3 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#4*{i_1#4 <- `i_1*`}, i_2#4*{i_2#4 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#5 j_2#5]*{j_1#5 <- `j_1*`, j_2#5 <- `j_2*`}) = $imul_(N, i_1#5, i_2#5)*{i_1#5 <- `i_1*`, i_2#5 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#6))*{j_1#6 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#6))*{j_2#6 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#6*{i_1#6 <- `i_1*`}, i_2#6*{i_2#6 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), `%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I32_Jnn : Jnn <: lanetype))), $lsizenn2((I32_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#1*{ci_1#1 <- `ci_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#1*{ci_2#1 <- `ci_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#1*{ci'_1#1 <- `ci'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#2)))*{ci_1#2 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#1*{ci'_2#1 <- `ci'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#2)))*{ci_2#2 <- `ci_2*`} + -- let{`ci*` : iN*} ci#1*{ci#1 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#2*{ci'_1#2 <- `ci'_1*`}, ci'_2#2*{ci'_2#2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#1*{ci'#1 <- `ci'*`} = $extend__(N, $lsizenn2((I32_Jnn : Jnn <: lanetype)), S_sx, ci#2)*{ci#2 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#125)*{iter_0#125 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#2*{ci'#2 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#126)))*{iter_0#126 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#3*{ci'#3 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I64_Jnn : Jnn <: lanetype))), $lsizenn2((I32_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#3*{ci_1#3 <- `ci_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#3*{ci_2#3 <- `ci_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#3*{ci'_1#3 <- `ci'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#4)))*{ci_1#4 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#3*{ci'_2#3 <- `ci'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#4)))*{ci_2#4 <- `ci_2*`} + -- let{`ci*` : iN*} ci#3*{ci#3 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#4*{ci'_1#4 <- `ci'_1*`}, ci'_2#4*{ci'_2#4 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#4*{ci'#4 <- `ci'*`} = $extend__(N, $lsizenn2((I32_Jnn : Jnn <: lanetype)), S_sx, ci#4)*{ci#4 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#127)*{iter_0#127 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#5*{ci'#5 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#128)))*{iter_0#128 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#6*{ci'#6 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I8_Jnn : Jnn <: lanetype))), $lsizenn2((I32_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#5*{ci_1#5 <- `ci_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#5*{ci_2#5 <- `ci_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#5*{ci'_1#5 <- `ci'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#6)))*{ci_1#6 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#5*{ci'_2#5 <- `ci'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#6)))*{ci_2#6 <- `ci_2*`} + -- let{`ci*` : iN*} ci#5*{ci#5 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#6*{ci'_1#6 <- `ci'_1*`}, ci'_2#6*{ci'_2#6 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#7*{ci'#7 <- `ci'*`} = $extend__(N, $lsizenn2((I32_Jnn : Jnn <: lanetype)), S_sx, ci#6)*{ci#6 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#129)*{iter_0#129 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#8*{ci'#8 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#130)))*{iter_0#130 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#9*{ci'#9 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I16_Jnn : Jnn <: lanetype))), $lsizenn2((I32_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#7*{ci_1#7 <- `ci_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#7*{ci_2#7 <- `ci_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#7*{ci'_1#7 <- `ci'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#8)))*{ci_1#8 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#7*{ci'_2#7 <- `ci'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#8)))*{ci_2#8 <- `ci_2*`} + -- let{`ci*` : iN*} ci#7*{ci#7 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#8*{ci'_1#8 <- `ci'_1*`}, ci'_2#8*{ci'_2#8 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#10*{ci'#10 <- `ci'*`} = $extend__(N, $lsizenn2((I32_Jnn : Jnn <: lanetype)), S_sx, ci#8)*{ci#8 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#131)*{iter_0#131 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#11*{ci'#11 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#132)))*{iter_0#132 <- $ivadd_pairwise_($lsizenn2((I32_Jnn : Jnn <: lanetype)), ci'#12*{ci'#12 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I32_Jnn : Jnn <: lanetype))), $lsizenn2((I64_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#9*{ci_1#9 <- `ci_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#9*{ci_2#9 <- `ci_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#9*{ci'_1#9 <- `ci'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#10)))*{ci_1#10 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#9*{ci'_2#9 <- `ci'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#10)))*{ci_2#10 <- `ci_2*`} + -- let{`ci*` : iN*} ci#9*{ci#9 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#10*{ci'_1#10 <- `ci'_1*`}, ci'_2#10*{ci'_2#10 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#13*{ci'#13 <- `ci'*`} = $extend__(N, $lsizenn2((I64_Jnn : Jnn <: lanetype)), S_sx, ci#10)*{ci#10 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#133)*{iter_0#133 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#14*{ci'#14 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#134)))*{iter_0#134 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#15*{ci'#15 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I64_Jnn : Jnn <: lanetype))), $lsizenn2((I64_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#11*{ci_1#11 <- `ci_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#11*{ci_2#11 <- `ci_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#11*{ci'_1#11 <- `ci'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#12)))*{ci_1#12 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#11*{ci'_2#11 <- `ci'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#12)))*{ci_2#12 <- `ci_2*`} + -- let{`ci*` : iN*} ci#11*{ci#11 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#12*{ci'_1#12 <- `ci'_1*`}, ci'_2#12*{ci'_2#12 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#16*{ci'#16 <- `ci'*`} = $extend__(N, $lsizenn2((I64_Jnn : Jnn <: lanetype)), S_sx, ci#12)*{ci#12 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#135)*{iter_0#135 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#17*{ci'#17 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#136)))*{iter_0#136 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#18*{ci'#18 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I8_Jnn : Jnn <: lanetype))), $lsizenn2((I64_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#13*{ci_1#13 <- `ci_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#13*{ci_2#13 <- `ci_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#13*{ci'_1#13 <- `ci'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#14)))*{ci_1#14 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#13*{ci'_2#13 <- `ci'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#14)))*{ci_2#14 <- `ci_2*`} + -- let{`ci*` : iN*} ci#13*{ci#13 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#14*{ci'_1#14 <- `ci'_1*`}, ci'_2#14*{ci'_2#14 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#19*{ci'#19 <- `ci'*`} = $extend__(N, $lsizenn2((I64_Jnn : Jnn <: lanetype)), S_sx, ci#14)*{ci#14 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#137)*{iter_0#137 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#20*{ci'#20 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#138)))*{iter_0#138 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#21*{ci'#21 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I16_Jnn : Jnn <: lanetype))), $lsizenn2((I64_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#15*{ci_1#15 <- `ci_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#15*{ci_2#15 <- `ci_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#15*{ci'_1#15 <- `ci'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#16)))*{ci_1#16 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#15*{ci'_2#15 <- `ci'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#16)))*{ci_2#16 <- `ci_2*`} + -- let{`ci*` : iN*} ci#15*{ci#15 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#16*{ci'_1#16 <- `ci'_1*`}, ci'_2#16*{ci'_2#16 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#22*{ci'#22 <- `ci'*`} = $extend__(N, $lsizenn2((I64_Jnn : Jnn <: lanetype)), S_sx, ci#16)*{ci#16 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#139)*{iter_0#139 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#23*{ci'#23 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#140)))*{iter_0#140 <- $ivadd_pairwise_($lsizenn2((I64_Jnn : Jnn <: lanetype)), ci'#24*{ci'#24 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I32_Jnn : Jnn <: lanetype))), $lsizenn2((I8_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#17*{ci_1#17 <- `ci_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#17*{ci_2#17 <- `ci_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#17*{ci'_1#17 <- `ci'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#18)))*{ci_1#18 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#17*{ci'_2#17 <- `ci'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#18)))*{ci_2#18 <- `ci_2*`} + -- let{`ci*` : iN*} ci#17*{ci#17 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#18*{ci'_1#18 <- `ci'_1*`}, ci'_2#18*{ci'_2#18 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#25*{ci'#25 <- `ci'*`} = $extend__(N, $lsizenn2((I8_Jnn : Jnn <: lanetype)), S_sx, ci#18)*{ci#18 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#141)*{iter_0#141 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#26*{ci'#26 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#142)))*{iter_0#142 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#27*{ci'#27 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I64_Jnn : Jnn <: lanetype))), $lsizenn2((I8_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#19*{ci_1#19 <- `ci_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#19*{ci_2#19 <- `ci_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#19*{ci'_1#19 <- `ci'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#20)))*{ci_1#20 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#19*{ci'_2#19 <- `ci'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#20)))*{ci_2#20 <- `ci_2*`} + -- let{`ci*` : iN*} ci#19*{ci#19 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#20*{ci'_1#20 <- `ci'_1*`}, ci'_2#20*{ci'_2#20 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#28*{ci'#28 <- `ci'*`} = $extend__(N, $lsizenn2((I8_Jnn : Jnn <: lanetype)), S_sx, ci#20)*{ci#20 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#143)*{iter_0#143 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#29*{ci'#29 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#144)))*{iter_0#144 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#30*{ci'#30 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I8_Jnn : Jnn <: lanetype))), $lsizenn2((I8_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#21*{ci_1#21 <- `ci_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#21*{ci_2#21 <- `ci_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#21*{ci'_1#21 <- `ci'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#22)))*{ci_1#22 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#21*{ci'_2#21 <- `ci'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#22)))*{ci_2#22 <- `ci_2*`} + -- let{`ci*` : iN*} ci#21*{ci#21 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#22*{ci'_1#22 <- `ci'_1*`}, ci'_2#22*{ci'_2#22 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#31*{ci'#31 <- `ci'*`} = $extend__(N, $lsizenn2((I8_Jnn : Jnn <: lanetype)), S_sx, ci#22)*{ci#22 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#145)*{iter_0#145 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#32*{ci'#32 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#146)))*{iter_0#146 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#33*{ci'#33 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I16_Jnn : Jnn <: lanetype))), $lsizenn2((I8_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#23*{ci_1#23 <- `ci_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#23*{ci_2#23 <- `ci_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#23*{ci'_1#23 <- `ci'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#24)))*{ci_1#24 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#23*{ci'_2#23 <- `ci'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#24)))*{ci_2#24 <- `ci_2*`} + -- let{`ci*` : iN*} ci#23*{ci#23 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#24*{ci'_1#24 <- `ci'_1*`}, ci'_2#24*{ci'_2#24 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#34*{ci'#34 <- `ci'*`} = $extend__(N, $lsizenn2((I8_Jnn : Jnn <: lanetype)), S_sx, ci#24)*{ci#24 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#147)*{iter_0#147 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#35*{ci'#35 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#148)))*{iter_0#148 <- $ivadd_pairwise_($lsizenn2((I8_Jnn : Jnn <: lanetype)), ci'#36*{ci'#36 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I32_Jnn : Jnn <: lanetype))), $lsizenn2((I16_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#25*{ci_1#25 <- `ci_1*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#25*{ci_2#25 <- `ci_2*`} = $lanes_(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#25*{ci'_1#25 <- `ci'_1*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#26)))*{ci_1#26 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#25*{ci'_2#25 <- `ci'_2*`} = $extend__($lsizenn1((I32_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#26)))*{ci_2#26 <- `ci_2*`} + -- let{`ci*` : iN*} ci#25*{ci#25 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#26*{ci'_1#26 <- `ci'_1*`}, ci'_2#26*{ci'_2#26 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#37*{ci'#37 <- `ci'*`} = $extend__(N, $lsizenn2((I16_Jnn : Jnn <: lanetype)), S_sx, ci#26)*{ci#26 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#149)*{iter_0#149 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#38*{ci'#38 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I32_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#150)))*{iter_0#150 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#39*{ci'#39 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I64_Jnn : Jnn <: lanetype))), $lsizenn2((I16_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#27*{ci_1#27 <- `ci_1*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#27*{ci_2#27 <- `ci_2*`} = $lanes_(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#27*{ci'_1#27 <- `ci'_1*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#28)))*{ci_1#28 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#27*{ci'_2#27 <- `ci'_2*`} = $extend__($lsizenn1((I64_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#28)))*{ci_2#28 <- `ci_2*`} + -- let{`ci*` : iN*} ci#27*{ci#27 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#28*{ci'_1#28 <- `ci'_1*`}, ci'_2#28*{ci'_2#28 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#40*{ci'#40 <- `ci'*`} = $extend__(N, $lsizenn2((I16_Jnn : Jnn <: lanetype)), S_sx, ci#28)*{ci#28 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#151)*{iter_0#151 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#41*{ci'#41 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I64_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#152)))*{iter_0#152 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#42*{ci'#42 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I8_Jnn : Jnn <: lanetype))), $lsizenn2((I16_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#29*{ci_1#29 <- `ci_1*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#29*{ci_2#29 <- `ci_2*`} = $lanes_(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#29*{ci'_1#29 <- `ci'_1*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#30)))*{ci_1#30 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#29*{ci'_2#29 <- `ci'_2*`} = $extend__($lsizenn1((I8_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#30)))*{ci_2#30 <- `ci_2*`} + -- let{`ci*` : iN*} ci#29*{ci#29 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#30*{ci'_1#30 <- `ci'_1*`}, ci'_2#30*{ci'_2#30 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#43*{ci'#43 <- `ci'*`} = $extend__(N, $lsizenn2((I16_Jnn : Jnn <: lanetype)), S_sx, ci#30)*{ci#30 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#153)*{iter_0#153 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#44*{ci'#44 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I8_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#154)))*{iter_0#154 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#45*{ci'#45 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1((I16_Jnn : Jnn <: lanetype))), $lsizenn2((I16_Jnn : Jnn <: lanetype))) + -- let{`ci_1*` : lane_*} ci_1#31*{ci_1#31 <- `ci_1*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#31*{ci_2#31 <- `ci_2*`} = $lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#31*{ci'_1#31 <- `ci'_1*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, S_sx, !($proj_lane__2(ci_1#32)))*{ci_1#32 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#31*{ci'_2#31 <- `ci'_2*`} = $extend__($lsizenn1((I16_Jnn : Jnn <: lanetype)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#32)))*{ci_2#32 <- `ci_2*`} + -- let{`ci*` : iN*} ci#31*{ci#31 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#32*{ci'_1#32 <- `ci'_1*`}, ci'_2#32*{ci'_2#32 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#46*{ci'#46 <- `ci'*`} = $extend__(N, $lsizenn2((I16_Jnn : Jnn <: lanetype)), S_sx, ci#32)*{ci#32 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#155)*{iter_0#155 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#47*{ci'#47 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_1),) + -- wf_shape: `%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#156)))*{iter_0#156 <- $ivadd_pairwise_($lsizenn2((I16_Jnn : Jnn <: lanetype)), ci'#48*{ci'#48 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape((I16_Jnn : Jnn <: lanetype), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(BOT_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{`null?` : null?, heaptype : heaptype, val : val}(REF_storagetype(`null?`, heaptype), val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(V128_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F64_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F32_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I64_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I32_storagetype, val) = ?((val : val <: fieldval)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I8_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i)),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I16_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(BOT_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(V128_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(BOT_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(V128_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(BOT_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(V128_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(BOT_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(V128_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(BOT_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(V128_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(BOT_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(V128_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(BOT_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(V128_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(BOT_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(V128_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(BOT_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(V128_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(BOT_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(V128_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I8_storagetype, ?(sx), PACK_fieldval(I8_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i))),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I16_storagetype, ?(sx), PACK_fieldval(I16_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa#1*{xa#1 <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#2*{xa#2 <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa#3*{xa#3 <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#4*{xa#4 <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa#5*{xa#5 <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#6*{xa#6 <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa#7*{xa#7 <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#8*{xa#8 <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa#9*{xa#9 <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#10*{xa#10 <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b#1*{b#1 <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b#2*{b#2 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r#1*{r#1 <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r#2*{r#2 <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b#3*{b#3 <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b#4*{b#4 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#1?{j#1 <- `j?`}), rt), REFS r'#1*{r'#1 <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#2?{j#2 <- `j?`}), rt), REFS r'#2*{r'#2 <- `r'*`} ++ r^n{}}) + -- if ($proj_uN_0(i').0 = (|r'#3*{r'#3 <- `r'*`}| + n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#3).0))?{j#3 <- `j?`} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size((at : addrtype <: numtype))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#4?{j#4 <- `j?`}), rt), REFS r'#4*{r'#4 <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#5?{j#5 <- `j?`}), rt), REFS r'#5*{r'#5 <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#6?{j#6 <- `j?`})), BYTES b#5*{b#5 <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#7?{j#7 <- `j?`})), BYTES b#6*{b#6 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b#7*{b#7 <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#8).0))?{j#8 <- `j?`} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size((at : addrtype <: numtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#9?{j#9 <- `j?`})), BYTES b#8*{b#8 <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#10?{j#10 <- `j?`})), BYTES b#9*{b#9 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val#1*{val#1 <- `val*`})) = (val : val <: instr)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.STRUCTS_store|) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.ARRAYS_store|) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), (dt : deftype <: heaptype)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (a < |s.EXNS_store|) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, (num : num <: val), (nt : numtype <: valtype)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, (vec : vec <: val), (vt : vectype <: valtype)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, (ref : ref <: val), (rt : reftype <: valtype)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, (val : val <: fieldval), (t : valtype <: storagetype)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, (packval : packval <: fieldval), (pt : packtype <: storagetype)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (a < |s.TAGS_store|) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (a < |s.GLOBALS_store|) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (a < |s.MEMS_store|) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (a < |s.TABLES_store|) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse)) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype(funcinst.TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([(val : val <: instr) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_1 : val <: instr)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([(val_1 : val <: instr) (val_2 : val <: instr) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [(val_2 : val <: instr)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l*{l <- `l*`}|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NULL_instr(l)], [(val : val <: instr)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([(val : val <: instr) BR_ON_NON_NULL_instr(l)], [(val : val <: instr) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val : val <: instr)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`})], (val : val <: instr)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`((val : val <: instr)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([(val : val <: instr) `LOCAL.TEE`_instr(x)], [(val : val <: instr) (val : val <: instr) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `REF.AS_NON_NULL`_instr], [(ref : ref <: instr)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([(ref_1 : ref <: instr) (ref_2 : ref <: instr) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([(val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([(ref : ref <: instr) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [(ref : ref <: instr)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (|$unop_(nt, unop, c_1)| > 0) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (|$binop_(nt, binop, c_1, c_2)| > 0) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (|$cvtop__(nt_1, nt_2, cvtop, c_1)| > 0) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvunop_(V128_vectype, vvunop, c_1)| > 0) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvbinop_(V128_vectype, vvbinop, c_1, c_2)| > 0) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vunop_(sh, vunop, c_1)| > 0) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vbinop_(sh, vbinop, c_1, c_2)| > 0) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)) + -- if ($proj_num__0(c) =/= ?()) + -- (if ($proj_lane__2(i) =/= ?()))*{i <- `i*`} + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(Jnn), !($proj_lane__2(i)))).0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^$proj_dim_0(M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)|) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((nt : numtype <: lanetype), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((nt : numtype <: lanetype), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape((nt : numtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if ($proj_num__0(c_2) =/= ?()) + -- if ($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)|) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape((pt : packtype <: lanetype), M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape((pt : packtype <: lanetype), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape((pt : packtype <: lanetype), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1#4*{t_1#4 <- `t_1*`},), `%`_resulttype(t_2#8*{t_2#8 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1#5*{t_1#5 <- `t_1*`},), [], `%`_resulttype(t_2#9*{t_2#9 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#6*{t_1#6 <- `t_1*`},), `%`_resulttype(t_2#10*{t_2#10 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t#5?{t#5 <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t#6?{t#6 <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [(ref : ref <: instr) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse)]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($s(z).FUNCS_store[a].TYPE_funcinst : deftype <: typeuse),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, (val : val <: instr)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val : val <: instr)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- if (a < |$s(z).FUNCS_store|) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, (val' : val <: instr)*{val' <- `val'*`} ++ (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), (val : val <: instr)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], (val : val <: instr)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [(val : val <: instr)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]), [($table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0] : ref <: instr)]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) ($elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0] : ref <: instr) `TABLE.SET`_instr(x) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c)))]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) LOAD_instr((Inn : addrtype <: numtype), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr((Inn : addrtype <: numtype), mk_num__0_num_(Inn, $extend__(n, $size((Inn : addrtype <: numtype)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((K * $proj_dim_0(M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($proj_num__0(i) =/= ?()))^(k<$proj_dim_0(M).0){} + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(M).0){j <- `j*`} + -- if ((c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))^$proj_dim_0(M).0{j <- `j*`})) /\ ($jsizenn(Jnn) = (K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))))^$proj_dim_0(M).0{j <- `j*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), $lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape((Jnn : Jnn <: lanetype), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape((Jnn : Jnn <: lanetype), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (val : val <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at_1 : addrtype <: numtype), i_1) CONST_instr((at_2 : addrtype <: numtype), i_2) CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr((at_1 : addrtype <: numtype), i_1),) + -- wf_instr: `%`(CONST_instr((at_2 : addrtype <: numtype), i_2),) + -- wf_instr: `%`(CONST_instr((at' : addrtype <: numtype), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$data(z, y).BYTES_datainst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [(ref : ref <: instr)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [(ref : ref <: instr) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), (val : val <: instr)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`val*`| = |`zt*`|) + -- (if ($default_($unpack(zt)) =/= ?()))*{zt <- `zt*`} + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [(!($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])) : val <: instr)]) + -- if ($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- if ($proj_uN_0(i).0 < |$s(z).STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |$s(z).STRUCTS_store|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), (val : val <: instr)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) =/= ?()) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), (ref : ref <: instr)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if ($proj_num__0(i) =/= ?()) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(i) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- (if ($cunpack(zt) =/= ?()))^n{} + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zsize(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])) : val <: instr)]) + -- if ($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0]) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_num__0(i) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- if (a < |$s(z).ARRAYS_store|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) (ref : ref <: instr) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (ref : ref <: instr) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if (ref = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- if ($cunpack(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if (a < |$s(z).FUNCS_store|) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- (if ($default_(t) =/= ?()))*{t <- `t*`} + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), (val : val <: instr)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- if ($as_deftype($tag(z, x).TYPE_taginst) =/= ?()) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [(val : val <: instr) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) (ref : ref <: instr) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if ($growtable($table(z, x), n, ref) =/= ?()) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [(ref : ref <: instr) CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(c) =/= ?()) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size((Inn : addrtype <: numtype)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) CONST_instr((Inn : addrtype <: numtype), c) STORE_instr((Inn : addrtype <: numtype), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if ($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]) =/= ?()) + -- if ($proj_uN_0(j).0 < |$lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)|) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape((Jnn : Jnn <: lanetype), M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if ($growmem($mem(z, x), n) =/= ?()) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr((at : addrtype <: numtype), mk_num__0_num_(at, `%`_uN($inv_signed_($size((at : addrtype <: numtype)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`, zt <- `zt*`} + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), [])) + -- if ($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) (val : val <: instr) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`} + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, (val : val <: instr)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($packfield_(zt, val) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) (val : val <: instr) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', (val : val <: instr)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', (val : val <: instr)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'#1*{type'#1 <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'#1*{deftype'#1 <- `deftype'*`} = $alloctypes(type'#2*{type'#2 <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype#1*{deftype#1 <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), (deftype'#2 : deftype <: typeuse)*{deftype'#2 <- `deftype'*`})) + -- if ($proj_uN_0(x).0 = |deftype'#3*{deftype'#3 <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'#1*{tagtype'#1 <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'#1*{ja'#1 <- `ja'*`}) = $alloctags(s_1, tagtype'#2*{tagtype'#2 <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'#1*{globaltype'#1 <- `globaltype'*`}, [val] ++ val'#1*{val'#1 <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'#1*{ga'#1 <- `ga'*`}) = $allocglobals(s_1, globaltype'#2*{globaltype'#2 <- `globaltype'*`}, val'#2*{val'#2 <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#11?{j#11 <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#12?{j#12 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#13?{j#13 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'#1*{memtype'#1 <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'#1*{ma'#1 <- `ma'*`}) = $allocmems(s_1, memtype'#2*{memtype'#2 <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j#16?{j#16 <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#17?{j#17 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#18?{j#18 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'#1*{tabletype'#1 <- `tabletype'*`}, [ref] ++ ref'#1*{ref'#1 <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'#1*{ta'#1 <- `ta'*`}) = $alloctables(s_1, tabletype'#2*{tabletype'#2 <- `tabletype'*`}, ref'#2*{ref'#2 <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'#5*{dt'#5 <- `dt'*`}, [funccode] ++ funccode'#1*{funccode'#1 <- `funccode'*`}, [moduleinst] ++ moduleinst'#1*{moduleinst'#1 <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'#1*{fa'#1 <- `fa'*`}) = $allocfuncs(s_1, dt'#6*{dt'#6 <- `dt'*`}, funccode'#2*{funccode'#2 <- `funccode'*`}, moduleinst'#2*{moduleinst'#2 <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte#2*{byte#2 <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte#3*{byte#3 <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte#4*{byte#4 <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'#1*{ok'#1 <- `ok'*`}, [b#10*{b#10 <- `b*`}] ++ b'#1*{b'#1 <- `b'*#1`}*{`b'*#1` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b#11*{b#11 <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'#1*{da'#1 <- `da'*`}) = $allocdatas(s_1, ok'#2*{ok'#2 <- `ok'*`}, b'#2*{b'#2 <- `b'*#2`}*{`b'*#2` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref#1*{ref#1 <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref#2*{ref#2 <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref#3*{ref#3 <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'#1*{rt'#1 <- `rt'*`}, [ref#4*{ref#4 <- `ref*`}] ++ ref'#3*{ref'#3 <- `ref'*#1`}*{`ref'*#1` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref#5*{ref#5 <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'#1*{ea'#1 <- `ea'*`}) = $allocelems(s_1, rt'#2*{rt'#2 <- `rt'*`}, ref'#4*{ref'#4 <- `ref'*#2`}*{`ref'*#2` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export#9*{export#9 <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr#1*{externaddr#1 <- `externaddr*`}, val_G#1*{val_G#1 <- `val_G*`}, ref_T#1*{ref_T#1 <- `ref_T*`}, ref_E#1*{ref_E#1 <- `ref_E*#1`}*{`ref_E*#1` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#2*{type#2 <- `type*`},), `%`_list(import#2*{import#2 <- `import*`},), `%`_list(tag#2*{tag#2 <- `tag*`},), `%`_list(global#4*{global#4 <- `global*`},), `%`_list(mem#8*{mem#8 <- `mem*`},), `%`_list(table#8*{table#8 <- `table*`},), `%`_list(func#3*{func#3 <- `func*`},), `%`_list(data#2*{data#2 <- `data*`},), `%`_list(elem#8*{elem#8 <- `elem*`},), start#2?{start#2 <- `start?`}, `%`_list(export#10*{export#10 <- `export*`},)) = module + -- if (tag#3*{tag#3 <- `tag*`} = TAG_tag(tagtype#1)*{tagtype#1 <- `tagtype*`}) + -- if (global#5*{global#5 <- `global*`} = GLOBAL_global(globaltype#122, expr_G#1)*{expr_G#1 <- `expr_G*`, globaltype#122 <- `globaltype*`}) + -- if (mem#9*{mem#9 <- `mem*`} = MEMORY_mem(memtype#1)*{memtype#1 <- `memtype*`}) + -- if (table#9*{table#9 <- `table*`} = TABLE_table(tabletype#156, expr_T#1)*{expr_T#1 <- `expr_T*`, tabletype#156 <- `tabletype*`}) + -- if (func#4*{func#4 <- `func*`} = FUNC_func(x#4, local#3*{local#3 <- `local*#82`}, expr_F#1)*{expr_F#1 <- `expr_F*`, `local*#82` <- `local**`, x#4 <- `x*`}) + -- if (data#3*{data#3 <- `data*`} = DATA_data(byte#5*{byte#5 <- `byte*#110`}, datamode#110)*{`byte*#110` <- `byte**`, datamode#110 <- `datamode*`}) + -- if (elem#9*{elem#9 <- `elem*`} = ELEM_elem(elemtype#1, expr_E#1*{expr_E#1 <- `expr_E*#1`}, elemmode#230)*{elemmode#230 <- `elemmode*`, elemtype#1 <- `elemtype*`, `expr_E*#1` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I#1*{aa_I#1 <- `aa_I*`} = $tagsxa(externaddr#2*{externaddr#2 <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I#1*{ga_I#1 <- `ga_I*`} = $globalsxa(externaddr#3*{externaddr#3 <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I#1*{ma_I#1 <- `ma_I*`} = $memsxa(externaddr#4*{externaddr#4 <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I#1*{ta_I#1 <- `ta_I*`} = $tablesxa(externaddr#5*{externaddr#5 <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I#1*{fa_I#1 <- `fa_I*`} = $funcsxa(externaddr#6*{externaddr#6 <- `externaddr*`}) + -- let{`dt*` : deftype*} dt#8*{dt#8 <- `dt*`} = $alloctypes(type#3*{type#3 <- `type*`}) + -- let{`fa*` : nat*} fa#1*{fa#1 <- `fa*`} = (|s.FUNCS_store| + i_F#1)^(i_F#1<|func#5*{func#5 <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa#1*{aa#1 <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype#2, (dt#9 : deftype <: typeuse)*{dt#9 <- `dt*`})*{tagtype#2 <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga#1*{ga#1 <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype#124, (dt#10 : deftype <: typeuse)*{dt#10 <- `dt*`})*{globaltype#124 <- `globaltype*`}, val_G#2*{val_G#2 <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma#1*{ma#1 <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype#2, (dt#11 : deftype <: typeuse)*{dt#11 <- `dt*`})*{memtype#2 <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta#1*{ta#1 <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype#158, (dt#12 : deftype <: typeuse)*{dt#12 <- `dt*`})*{tabletype#158 <- `tabletype*`}, ref_T#2*{ref_T#2 <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da#1*{da#1 <- `da*`}) = $allocdatas(s_4, OK_datatype^|data#4*{data#4 <- `data*`}|{}, byte#6*{byte#6 <- `byte*#112`}*{`byte*#112` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea#1*{ea#1 <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype#2, (dt#13 : deftype <: typeuse)*{dt#13 <- `dt*`})*{elemtype#2 <- `elemtype*`}, ref_E#2*{ref_E#2 <- `ref_E*#2`}*{`ref_E*#2` <- `ref_E**`}) + -- if ((s_7, fa#2*{fa#2 <- `fa*`}) = $allocfuncs(s_6, dt#14*{dt#14 <- `dt*`}[$proj_uN_0(x#5).0]*{x#5 <- `x*`}, FUNC_funccode(x#6, local#4*{local#4 <- `local*#84`}, expr_F#2)*{expr_F#2 <- `expr_F*`, `local*#84` <- `local**`, x#6 <- `x*`}, moduleinst^|func#6*{func#6 <- `func*`}|{})) + -- if (xi#1*{xi#1 <- `xi*`} = $allocexports({TYPES [], TAGS aa_I#2*{aa_I#2 <- `aa_I*`} ++ aa#2*{aa#2 <- `aa*`}, GLOBALS ga_I#2*{ga_I#2 <- `ga_I*`} ++ ga#2*{ga#2 <- `ga*`}, MEMS ma_I#2*{ma_I#2 <- `ma_I*`} ++ ma#2*{ma#2 <- `ma*`}, TABLES ta_I#2*{ta_I#2 <- `ta_I*`} ++ ta#2*{ta#2 <- `ta*`}, FUNCS fa_I#2*{fa_I#2 <- `fa_I*`} ++ fa#3*{fa#3 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export#11*{export#11 <- `export*`})) + -- if (moduleinst = {TYPES dt#15*{dt#15 <- `dt*`}, TAGS aa_I#3*{aa_I#3 <- `aa_I*`} ++ aa#3*{aa#3 <- `aa*`}, GLOBALS ga_I#3*{ga_I#3 <- `ga_I*`} ++ ga#3*{ga#3 <- `ga*`}, MEMS ma_I#3*{ma_I#3 <- `ma_I*`} ++ ma#3*{ma#3 <- `ma*`}, TABLES ta_I#3*{ta_I#3 <- `ta_I*`} ++ ta#3*{ta#3 <- `ta*`}, FUNCS fa_I#3*{fa_I#3 <- `fa_I*`} ++ fa#4*{fa#4 <- `fa*`}, DATAS da#2*{da#2 <- `da*`}, ELEMS ea#2*{ea#2 <- `ea*`}, EXPORTS xi#2*{xi#2 <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type#4*{type#4 <- `type*`},), `%`_list(import#3*{import#3 <- `import*`},), `%`_list(tag#4*{tag#4 <- `tag*`},), `%`_list(global#6*{global#6 <- `global*`},), `%`_list(mem#10*{mem#10 <- `mem*`},), `%`_list(table#10*{table#10 <- `table*`},), `%`_list(func#7*{func#7 <- `func*`},), `%`_list(data#5*{data#5 <- `data*`},), `%`_list(elem#10*{elem#10 <- `elem*`},), start#3?{start#3 <- `start?`}, `%`_list(export#12*{export#12 <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype#3),))*{tagtype#3 <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype#125, expr_G#2),))*{expr_G#2 <- `expr_G*`, globaltype#125 <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype#3),))*{memtype#3 <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype#159, expr_T#2),))*{expr_T#2 <- `expr_T*`, tabletype#159 <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x#7, local#5*{local#5 <- `local*#86`}, expr_F#3),))*{expr_F#3 <- `expr_F*`, `local*#86` <- `local**`, x#7 <- `x*`} + -- (wf_data: `%`(DATA_data(byte#7*{byte#7 <- `byte*#113`}, datamode#112),))*{`byte*#113` <- `byte**`, datamode#112 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype#3, expr_E#2*{expr_E#2 <- `expr_E*#2`}, elemmode#232),))*{elemmode#232 <- `elemmode*`, elemtype#3 <- `elemtype*`, `expr_E*#2` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I#4*{aa_I#4 <- `aa_I*`} ++ aa#4*{aa#4 <- `aa*`}, GLOBALS ga_I#4*{ga_I#4 <- `ga_I*`} ++ ga#4*{ga#4 <- `ga*`}, MEMS ma_I#4*{ma_I#4 <- `ma_I*`} ++ ma#4*{ma#4 <- `ma*`}, TABLES ta_I#4*{ta_I#4 <- `ta_I*`} ++ ta#4*{ta#4 <- `ta*`}, FUNCS fa_I#4*{fa_I#4 <- `fa_I*`} ++ fa#5*{fa#5 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt#16*{dt#16 <- `dt*`}, TAGS aa_I#5*{aa_I#5 <- `aa_I*`} ++ aa#5*{aa#5 <- `aa*`}, GLOBALS ga_I#5*{ga_I#5 <- `ga_I*`} ++ ga#5*{ga#5 <- `ga*`}, MEMS ma_I#5*{ma_I#5 <- `ma_I*`} ++ ma#5*{ma#5 <- `ma*`}, TABLES ta_I#5*{ta_I#5 <- `ta_I*`} ++ ta#5*{ta#5 <- `ta*`}, FUNCS fa_I#5*{fa_I#5 <- `fa_I*`} ++ fa#6*{fa#6 <- `fa*`}, DATAS da#3*{da#3 <- `da*`}, ELEMS ea#3*{ea#3 <- `ea*`}, EXPORTS xi#3*{xi#3 <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b#12^n{b#12 <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b#13^n{b#13 <- `b*`}, ACTIVE_datamode(y, instr#8*{instr#8 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#1^n{e#1 <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#3^n{e#3 <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e#5^n{e#5 <- `e*`}, ACTIVE_elemmode(y, instr#10*{instr#10 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'#1*{expr'#1 <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [(ref : ref <: val)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'#5*{ref'#5 <- `ref'*`}) = $evalexprs(z', expr'#2*{expr'#2 <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr#373*{expr#373 <- `expr*`}] ++ expr'#3*{expr'#3 <- `expr'*#1`}*{`expr'*#1` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref#6*{ref#6 <- `ref*`}) = $evalexprs(z, expr#374*{expr#374 <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'#6*{ref'#6 <- `ref'*#3`}*{`ref'*#3` <- `ref'**`}) = $evalexprss(z', expr'#4*{expr'#4 <- `expr'*#2`}*{`expr'*#2` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'#1*{gt'#1 <- `gt'*`}, [expr] ++ expr'#5*{expr'#5 <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'#3*{val'#3 <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'#2*{gt'#2 <- `gt'*`}, expr'#6*{expr'#6 <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr#7*{externaddr#7 <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I#1*{xt_I#1 <- `xt_I*`}, xt_E#1*{xt_E#1 <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr#8, xt_I#2))*{externaddr#8 <- `externaddr*`, xt_I#2 <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#5*{type#5 <- `type*`},), `%`_list(import#4*{import#4 <- `import*`},), `%`_list(tag#5*{tag#5 <- `tag*`},), `%`_list(global#7*{global#7 <- `global*`},), `%`_list(mem#11*{mem#11 <- `mem*`},), `%`_list(table#11*{table#11 <- `table*`},), `%`_list(func#8*{func#8 <- `func*`},), `%`_list(data#6*{data#6 <- `data*`},), `%`_list(elem#11*{elem#11 <- `elem*`},), start#4?{start#4 <- `start?`}, `%`_list(export#13*{export#13 <- `export*`},)) = module + -- if (global#8*{global#8 <- `global*`} = GLOBAL_global(globaltype#127, expr_G#3)*{expr_G#3 <- `expr_G*`, globaltype#127 <- `globaltype*`}) + -- if (table#12*{table#12 <- `table*`} = TABLE_table(tabletype#161, expr_T#3)*{expr_T#3 <- `expr_T*`, tabletype#161 <- `tabletype*`}) + -- if (data#7*{data#7 <- `data*`} = DATA_data(byte#8*{byte#8 <- `byte*#117`}, datamode#116)*{`byte*#117` <- `byte**`, datamode#116 <- `datamode*`}) + -- if (elem#12*{elem#12 <- `elem*`} = ELEM_elem(reftype#521, expr_E#3*{expr_E#3 <- `expr_E*#3`}, elemmode#237)*{elemmode#237 <- `elemmode*`, `expr_E*#3` <- `expr_E**`, reftype#521 <- `reftype*`}) + -- if (start#5?{start#5 <- `start?`} = START_start(x#8)?{x#8 <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type#6*{type#6 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#9*{externaddr#9 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#10*{externaddr#10 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#2)^(i_F#2<|func#9*{func#9 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G#3*{val_G#3 <- `val_G*`}) = $evalglobals(z, globaltype#129*{globaltype#129 <- `globaltype*`}, expr_G#4*{expr_G#4 <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T#3*{ref_T#3 <- `ref_T*`}) = $evalexprs(z', expr_T#4*{expr_T#4 <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E#3*{ref_E#3 <- `ref_E*#3`}*{`ref_E*#3` <- `ref_E**`}) = $evalexprss(z'', expr_E#4*{expr_E#4 <- `expr_E*#4`}*{`expr_E*#4` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr#11*{externaddr#11 <- `externaddr*`}, val_G#4*{val_G#4 <- `val_G*`}, ref_T#4*{ref_T#4 <- `ref_T*`}, ref_E#4*{ref_E#4 <- `ref_E*#4`}*{`ref_E*#4` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D#1*{instr_D#1 <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D#1,), data#9*{data#9 <- `data*`}[i_D#1])^(i_D#1<|data#8*{data#8 <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E#1*{instr_E#1 <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E#1,), elem#14*{elem#14 <- `elem*`}[i_E#1])^(i_E#1<|elem#13*{elem#13 <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S#1?{instr_S#1 <- `instr_S?`} = CALL_instr(x#9)?{x#9 <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E#2*{instr_E#2 <- `instr_E*`} ++ instr_D#2*{instr_D#2 <- `instr_D*`} ++ lift(instr_S#2?{instr_S#2 <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I#3*{xt_I#3 <- `xt_I*`}, xt_E#2*{xt_E#2 <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type#7*{type#7 <- `type*`},), `%`_list(import#5*{import#5 <- `import*`},), `%`_list(tag#6*{tag#6 <- `tag*`},), `%`_list(global#9*{global#9 <- `global*`},), `%`_list(mem#12*{mem#12 <- `mem*`},), `%`_list(table#13*{table#13 <- `table*`},), `%`_list(func#10*{func#10 <- `func*`},), `%`_list(data#10*{data#10 <- `data*`},), `%`_list(elem#15*{elem#15 <- `elem*`},), start#6?{start#6 <- `start?`}, `%`_list(export#14*{export#14 <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype#130, expr_G#5),))*{expr_G#5 <- `expr_G*`, globaltype#130 <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype#163, expr_T#5),))*{expr_T#5 <- `expr_T*`, tabletype#163 <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte#9*{byte#9 <- `byte*#119`}, datamode#118),))*{`byte*#119` <- `byte**`, datamode#118 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype#523, expr_E#5*{expr_E#5 <- `expr_E*#5`}, elemmode#239),))*{elemmode#239 <- `elemmode*`, `expr_E*#5` <- `expr_E**`, reftype#523 <- `reftype*`} + -- (wf_start: `%`(START_start(x#10),))?{x#10 <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type#8*{type#8 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#12*{externaddr#12 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#13*{externaddr#13 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#3)^(i_F#3<|func#11*{func#11 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D#2,)))^(i_D#2<|data#11*{data#11 <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E#2,)))^(i_E#2<|elem#16*{elem#16 <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x#11),))?{x#11 <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val#2*{val#2 <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val : val <: instr)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1#7*{t_1#7 <- `t_1*`},), `%`_resulttype(t_2#11*{t_2#11 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val#3, t_1#8))*{t_1#8 <- `t_1*`, val#3 <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), (val#4 : val <: instr)*{val#4 <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr(s.FUNCS_store[funcaddr].TYPE_funcinst : deftype <: typeuse)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#9*{t_1#9 <- `t_1*`},), `%`_resulttype(t_2#12*{t_2#12 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'#1*{I'#1 <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{var_0 : rectype, `decl'*` : decl*}([TYPE_decl(var_0)] ++ decl'#1*{decl'#1 <- `decl'*`}) = [TYPE_type(var_0)] ++ $typesd(decl'#2*{decl'#2 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#3*{decl'#3 <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{name : name, name_0 : name, externtype : externtype, `decl'*` : decl*}([IMPORT_decl(name, name_0, externtype)] ++ decl'#4*{decl'#4 <- `decl'*`}) = [IMPORT_import(name, name_0, externtype)] ++ $importsd(decl'#5*{decl'#5 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#6*{decl'#6 <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{var_0 : tagtype, `decl'*` : decl*}([TAG_decl(var_0)] ++ decl'#7*{decl'#7 <- `decl'*`}) = [TAG_tag(var_0)] ++ $tagsd(decl'#8*{decl'#8 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#9*{decl'#9 <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{globaltype : globaltype, expr : expr, `decl'*` : decl*}([GLOBAL_decl(globaltype, expr)] ++ decl'#10*{decl'#10 <- `decl'*`}) = [GLOBAL_global(globaltype, expr)] ++ $globalsd(decl'#11*{decl'#11 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#12*{decl'#12 <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{var_0 : memtype, `decl'*` : decl*}([MEMORY_decl(var_0)] ++ decl'#13*{decl'#13 <- `decl'*`}) = [MEMORY_mem(var_0)] ++ $memsd(decl'#14*{decl'#14 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#15*{decl'#15 <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{tabletype : tabletype, expr : expr, `decl'*` : decl*}([TABLE_decl(tabletype, expr)] ++ decl'#16*{decl'#16 <- `decl'*`}) = [TABLE_table(tabletype, expr)] ++ $tablesd(decl'#17*{decl'#17 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#18*{decl'#18 <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{typeidx : typeidx, `local*` : local*, expr : expr, `decl'*` : decl*}([FUNC_decl(typeidx, `local*`, expr)] ++ decl'#19*{decl'#19 <- `decl'*`}) = [FUNC_func(typeidx, `local*`, expr)] ++ $funcsd(decl'#20*{decl'#20 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#21*{decl'#21 <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{`byte*` : byte*, datamode : datamode, `decl'*` : decl*}([DATA_decl(`byte*`, datamode)] ++ decl'#22*{decl'#22 <- `decl'*`}) = [DATA_data(`byte*`, datamode)] ++ $datasd(decl'#23*{decl'#23 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#24*{decl'#24 <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{reftype : reftype, `expr*` : expr*, elemmode : elemmode, `decl'*` : decl*}([ELEM_decl(reftype, `expr*`, elemmode)] ++ decl'#25*{decl'#25 <- `decl'*`}) = [ELEM_elem(reftype, `expr*`, elemmode)] ++ $elemsd(decl'#26*{decl'#26 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#27*{decl'#27 <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{var_0 : funcidx, `decl'*` : decl*}([START_decl(var_0)] ++ decl'#28*{decl'#28 <- `decl'*`}) = [START_start(var_0)] ++ $startsd(decl'#29*{decl'#29 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#30*{decl'#30 <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{name : name, externidx : externidx, `decl'*` : decl*}([EXPORT_decl(name, externidx)] ++ decl'#31*{decl'#31 <- `decl'*`}) = [EXPORT_export(name, externidx)] ++ $exportsd(decl'#32*{decl'#32 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#33*{decl'#33 <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl#1*{decl#1 <- `decl*`}) = true + -- if ($importsd(decl#2*{decl#2 <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{name : name, name_0 : name, externtype : externtype, `decl_1*` : decl*, `decl_2*` : decl*}(decl_1#1*{decl_1#1 <- `decl_1*`} ++ [IMPORT_decl(name, name_0, externtype)] ++ decl_2#1*{decl_2#1 <- `decl_2*`}) = (((((($importsd(decl_1#7*{decl_1#7 <- `decl_1*`}) = []) /\ ($tagsd(decl_1#6*{decl_1#6 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1#5*{decl_1#5 <- `decl_1*`}) = [])) /\ ($memsd(decl_1#4*{decl_1#4 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1#3*{decl_1#3 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1#2*{decl_1#2 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if ($proj_uN_0(x).0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i 0) + -- (if (exportinst.ADDR_exportinst <- TAG_externaddr(tagaddr)*{tagaddr <- `tagaddr*`} ++ GLOBAL_externaddr(globaladdr)*{globaladdr <- `globaladdr*`} ++ MEM_externaddr(memaddr)*{memaddr <- `memaddr*`} ++ TABLE_externaddr(tableaddr)*{tableaddr <- `tableaddr*`} ++ FUNC_externaddr(funcaddr)*{funcaddr <- `funcaddr*`}))*{exportinst <- `exportinst*`} + -- if (k <= |funcaddr*{funcaddr <- `funcaddr*`}|) + -- wf_store: `%`(s,) + -- wf_moduleinst: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}},) + -- wf_context: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), (yy : typeuse <: heaptype))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, (ref : ref <: instr), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(rt : reftype <: valtype)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE (func : func <: funccode)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`zt*`|) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if (ta < |s.TAGS_store|) + -- if ((dt : deftype <: typeuse) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if (|`t*`| = |`val*`|) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- if (i < |s.STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |s.STRUCTS_store|) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (i < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- if (i < |s.ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |s.ARRAYS_store|) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, (s.EXNS_store[a].FIELDS_exninst[i] : val <: fieldval)) + -- if (i < |s.EXNS_store[a].FIELDS_exninst|) + -- if (a < |s.EXNS_store|) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- if (|`taginst*`| = |`tagtype*`|) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- if (|`globalinst*`| = |`globaltype*`|) + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- if (|`meminst*`| = |`memtype*`|) + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- if (|`tableinst*`| = |`tabletype*`|) + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- if (|`deftype*`| = |`funcinst*`|) + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- if (|`datainst*`| = |`datatype*`|) + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- if (|`eleminst*`| = |`elemtype*`|) + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`fv'*`|) + -- if (|`fv*`| = |`mut?*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (|`fv*`| = |`fv'*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (if (a < |s.TAGS_store|))^(a<|s.TAGS_store|){} + -- (if (a < |s'.TAGS_store|))^(a<|s.TAGS_store|){} + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (if (a < |s.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (if (a < |s'.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (if (a < |s.MEMS_store|))^(a<|s.MEMS_store|){} + -- (if (a < |s'.MEMS_store|))^(a<|s.MEMS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (if (a < |s.TABLES_store|))^(a<|s.TABLES_store|){} + -- (if (a < |s'.TABLES_store|))^(a<|s.TABLES_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (if (a < |s.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (if (a < |s'.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (if (a < |s.DATAS_store|))^(a<|s.DATAS_store|){} + -- (if (a < |s'.DATAS_store|))^(a<|s.DATAS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (if (a < |s.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (if (a < |s'.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (if (a < |s.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (if (a < |s'.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (if (a < |s.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (if (a < |s'.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (if (a < |s.EXNS_store|))^(a<|s.EXNS_store|){} + -- (if (a < |s'.EXNS_store|))^(a<|s.EXNS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'#1*{X'#1 <- `X'*`}, [Y] ++ Y'#1*{Y'#1 <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'#1*{a'#1 <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'#2*{X'#2 <- `X'*`}, Y'#2*{Y'#2 <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8($proj_name_0(name).0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => (nt : numtype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => (vt : vectype <: valtype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => (rt : reftype <: valtype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => (t : valtype <: storagetype) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => (pt : packtype <: storagetype) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => (`` : (type, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => (`` : (import, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => (`` : (tag, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => (`` : (global, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => (`` : (mem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => (`` : (table, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => (`` : (func, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => (`` : (data, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => (`` : (elem, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => (`` : (start, idctxt) <: (decl, idctxt)) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => (`` : (export, idctxt) <: (decl, idctxt)) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/11-sub.il b/spectec/test-middlend/specification.exp/11-sub.il new file mode 100644 index 0000000000..52f92dbc25 --- /dev/null +++ b/spectec/test-middlend/specification.exp/11-sub.il @@ -0,0 +1,20177 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'#1*{n'#1 <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'#2*{n'#2 <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w#72*{w#72 <- `w*`}] ++ w'#85*{w'#85 <- `w'*#2`}*{`w'*#2` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w#73^n{w#73 <- `w*`}] ++ w'#86^n{w'#86 <- `w'*#3`}*{`w'*#3` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w#74?{w#74 <- `w?`}] ++ w'#87?{w'#87 <- `w'?#71`}*{`w'?#71` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'#88*{w'#88 <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'#89*{w'#89 <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w#75*{w#75 <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'#90*{w'#90 <- `w'*`}, w#76*{w#76 <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'#91*{w'#91 <- `w'*`}] ++ w#77*{w#77 <- `w*#1`}*{`w*#1` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w#78*{w#78 <- `w*#2`}*{`w*#2` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'#92*{w'#92 <- `w'*`}, w#79*{w#79 <- `w*#3`}*{`w*#3` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1#1*{w_1#1 <- `w_1*`}] ++ w#80*{w#80 <- `w*#4`}*{`w*#4` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch#1*{ch#1 <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx#1*{xx#1 <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#2*{xx#2 <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx#3*{xx#3 <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#4*{xx#4 <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx#5*{xx#5 <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#6*{xx#6 <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx#7*{xx#7 <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#8*{xx#8 <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx#9*{xx#9 <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#10*{xx#10 <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'#1*{free'#1 <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +def $numtype_addrtype(addrtype) : numtype + def $numtype_addrtype(I32_addrtype) = I32_numtype + def $numtype_addrtype(I64_addrtype) = I64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +def $consttype_numtype(numtype) : consttype + def $consttype_numtype(I32_numtype) = I32_consttype + def $consttype_numtype(I64_numtype) = I64_consttype + def $consttype_numtype(F32_numtype) = F32_consttype + def $consttype_numtype(F64_numtype) = F64_consttype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:102.1-103.16 +syntax resulttype = list(syntax valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +def $heaptype_absheaptype(absheaptype) : heaptype + def $heaptype_absheaptype(ANY_absheaptype) = ANY_heaptype + def $heaptype_absheaptype(EQ_absheaptype) = EQ_heaptype + def $heaptype_absheaptype(I31_absheaptype) = I31_heaptype + def $heaptype_absheaptype(STRUCT_absheaptype) = STRUCT_heaptype + def $heaptype_absheaptype(ARRAY_absheaptype) = ARRAY_heaptype + def $heaptype_absheaptype(NONE_absheaptype) = NONE_heaptype + def $heaptype_absheaptype(FUNC_absheaptype) = FUNC_heaptype + def $heaptype_absheaptype(NOFUNC_absheaptype) = NOFUNC_heaptype + def $heaptype_absheaptype(EXN_absheaptype) = EXN_heaptype + def $heaptype_absheaptype(NOEXN_absheaptype) = NOEXN_heaptype + def $heaptype_absheaptype(EXTERN_absheaptype) = EXTERN_heaptype + def $heaptype_absheaptype(NOEXTERN_absheaptype) = NOEXTERN_heaptype + def $heaptype_absheaptype(BOT_absheaptype) = BOT_heaptype + +def $valtype_addrtype(addrtype) : valtype + def $valtype_addrtype(I32_addrtype) = I32_valtype + def $valtype_addrtype(I64_addrtype) = I64_valtype + +def $storagetype_consttype(consttype) : storagetype + def $storagetype_consttype(I32_consttype) = I32_storagetype + def $storagetype_consttype(I64_consttype) = I64_storagetype + def $storagetype_consttype(F32_consttype) = F32_storagetype + def $storagetype_consttype(F64_consttype) = F64_storagetype + def $storagetype_consttype(V128_consttype) = V128_storagetype + +def $storagetype_numtype(numtype) : storagetype + def $storagetype_numtype(I32_numtype) = I32_storagetype + def $storagetype_numtype(I64_numtype) = I64_storagetype + def $storagetype_numtype(F32_numtype) = F32_storagetype + def $storagetype_numtype(F64_numtype) = F64_storagetype + +def $valtype_numtype(numtype) : valtype + def $valtype_numtype(I32_numtype) = I32_valtype + def $valtype_numtype(I64_numtype) = I64_valtype + def $valtype_numtype(F32_numtype) = F32_valtype + def $valtype_numtype(F64_numtype) = F64_valtype + +def $heaptype_typeuse(typeuse) : heaptype + def $heaptype_typeuse{x : typeidx}(_IDX_typeuse(x)) = _IDX_heaptype(x) + def $heaptype_typeuse{x0 : rectype, x1 : n}(_DEF_typeuse(x0, x1)) = _DEF_heaptype(x0, x1) + def $heaptype_typeuse{x : n}(REC_typeuse(x)) = REC_heaptype(x) + +def $storagetype_valtype(valtype) : storagetype + def $storagetype_valtype(I32_valtype) = I32_storagetype + def $storagetype_valtype(I64_valtype) = I64_storagetype + def $storagetype_valtype(F32_valtype) = F32_storagetype + def $storagetype_valtype(F64_valtype) = F64_storagetype + def $storagetype_valtype(V128_valtype) = V128_storagetype + def $storagetype_valtype{x0 : null?, x1 : heaptype}(REF_valtype(x0, x1)) = REF_storagetype(x0, x1) + def $storagetype_valtype(BOT_valtype) = BOT_storagetype + +def $storagetype_vectype(vectype) : storagetype + def $storagetype_vectype(V128_vectype) = V128_storagetype + +def $valtype_vectype(vectype) : valtype + def $valtype_vectype(V128_vectype) = V128_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +def $heaptype_deftype(deftype) : heaptype + def $heaptype_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_heaptype(x0, x1) + +def $typeuse_deftype(deftype) : typeuse + def $typeuse_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_typeuse(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +def $typeuse_typevar(typevar) : typeuse + def $typeuse_typevar{x : typeidx}(_IDX_typevar(x)) = _IDX_typeuse(x) + def $typeuse_typevar{x : n}(REC_typevar(x)) = REC_typeuse(x) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +def $storagetype_reftype(reftype) : storagetype + def $storagetype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_storagetype(x0, x1) + +def $valtype_reftype(reftype) : valtype + def $valtype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_valtype(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +def $numtype_Fnn(Fnn) : numtype + def $numtype_Fnn(F32_Fnn) = F32_numtype + def $numtype_Fnn(F64_Fnn) = F64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +def $storagetype_packtype(packtype) : storagetype + def $storagetype_packtype(I8_packtype) = I8_storagetype + def $storagetype_packtype(I16_packtype) = I16_storagetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +def $lanetype_Fnn(Fnn) : lanetype + def $lanetype_Fnn(F32_Fnn) = F32_lanetype + def $lanetype_Fnn(F64_Fnn) = F64_lanetype + +def $lanetype_addrtype(addrtype) : lanetype + def $lanetype_addrtype(I32_addrtype) = I32_lanetype + def $lanetype_addrtype(I64_addrtype) = I64_lanetype + +def $lanetype_numtype(numtype) : lanetype + def $lanetype_numtype(I32_numtype) = I32_lanetype + def $lanetype_numtype(I64_numtype) = I64_lanetype + def $lanetype_numtype(F32_numtype) = F32_lanetype + def $lanetype_numtype(F64_numtype) = F64_lanetype + +def $lanetype_packtype(packtype) : lanetype + def $lanetype_packtype(I8_packtype) = I8_lanetype + def $lanetype_packtype(I16_packtype) = I16_lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +def $lanetype_Jnn(Jnn) : lanetype + def $lanetype_Jnn(I32_Jnn) = I32_lanetype + def $lanetype_Jnn(I64_Jnn) = I64_lanetype + def $lanetype_Jnn(I8_Jnn) = I8_lanetype + def $lanetype_Jnn(I16_Jnn) = I16_lanetype + +def $Jnn_addrtype(addrtype) : Jnn + def $Jnn_addrtype(I32_addrtype) = I32_Jnn + def $Jnn_addrtype(I64_addrtype) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I32_lanetype) = $size(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I64_lanetype) = $size(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F32_lanetype) = $size(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F64_lanetype) = $size(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I8_lanetype) = $psize(I8_packtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I16_lanetype) = $psize(I16_packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I32_storagetype) = ?($size(I32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I64_storagetype) = ?($size(I64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F32_storagetype) = ?($size(F32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F64_storagetype) = ?($size(F64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(V128_storagetype) = ?($vsize(V128_vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I8_storagetype) = ?($psize(I8_packtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I16_storagetype) = ?($psize(I16_packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size($numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize($lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size($numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = $Jnn_addrtype(iter_val#1)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize($lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I32_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I64_lanetype) = I64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F32_lanetype) = F32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F64_lanetype) = F64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I8_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I16_lanetype) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(BOT_storagetype) = BOT_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = REF_valtype(`null?`, heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(V128_storagetype) = V128_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F64_storagetype) = F64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F32_storagetype) = F32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I64_storagetype) = I64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I32_storagetype) = I32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I8_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I16_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I32_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I64_storagetype) = ?(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F32_storagetype) = ?(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F64_storagetype) = ?(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I8_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I16_storagetype) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack(V128_storagetype) = ?(V128_vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?(I64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?(F32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?(F64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(V128_storagetype) = ?(V128_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?($consttype_numtype($lunpack(I32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?($consttype_numtype($lunpack(I64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?($consttype_numtype($lunpack(F32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?($consttype_numtype($lunpack(F64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?($consttype_numtype($lunpack(I8_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?($consttype_numtype($lunpack(I16_lanetype))) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size($numtype_addrtype(at_1)) <= $size($numtype_addrtype(at_2))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#1?{null_1#1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#2?{null_1#2 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1#3?{null_1#3 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{rectype : rectype, n : n}(_DEF_typeuse(rectype, n)) = ?(_DEF_deftype(rectype, n)) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt#1*{xt#1 <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#2*{xt#2 <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt#3*{xt#3 <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#4*{xt#4 <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt#5*{xt#5 <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#6*{xt#6 <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt#7*{xt#7 <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#8*{xt#8 <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{rectype : rectype, n : n, `xt*` : externtype*}([FUNC_externtype(_DEF_typeuse(rectype, n))] ++ xt#9*{xt#9 <- `xt*`}) = [_DEF_deftype(rectype, n)] ++ $funcsxt(xt#10*{xt#10 <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#11*{xt#11 <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?($typeuse_typevar(tv)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'#1*{tv'#1 <- `tv'*`}, [tu_1] ++ tu'#1*{tu'#1 <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv#1*{tv#1 <- `tv*`}, [tu_1] ++ tu#1*{tu#1 <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv#2*{tv#2 <- `tv*`}, [tu_1] ++ tu#2*{tu#2 <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#2*{tv'#2 <- `tv'*`}, tu'#2*{tu'#2 <- `tu'*`}) = !($minus_recs(tv#3*{tv#3 <- `tv*`}, tu#3*{tu#3 <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv#4*{tv#4 <- `tv*`}, tu#4*{tu#4 <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv#5*{tv#5 <- `tv*`}, tu#5*{tu#5 <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv#6*{tv#6 <- `tv*`}, tu#6*{tu#6 <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_typeuse(var_1), tv#7*{tv#7 <- `tv*`}, tu#7*{tu#7 <- `tu*`}) = !($subst_typevar(REC_typevar(var_1), tv#8*{tv#8 <- `tv*`}, tu#8*{tu#8 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_typeuse(var_0), tv#9*{tv#9 <- `tv*`}, tu#9*{tu#9 <- `tu*`}) = !($subst_typevar(_IDX_typevar(var_0), tv#10*{tv#10 <- `tv*`}, tu#10*{tu#10 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_typeuse(rectype, n), tv#11*{tv#11 <- `tv*`}, tu#11*{tu#11 <- `tu*`}) = $typeuse_deftype($subst_deftype(_DEF_deftype(rectype, n), tv#12*{tv#12 <- `tv*`}, tu#12*{tu#12 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_heaptype(var_1), tv#13*{tv#13 <- `tv*`}, tu#13*{tu#13 <- `tu*`}) = $heaptype_typeuse(!($subst_typevar(REC_typevar(var_1), tv#14*{tv#14 <- `tv*`}, tu#14*{tu#14 <- `tu*`}))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_heaptype(var_0), tv#15*{tv#15 <- `tv*`}, tu#15*{tu#15 <- `tu*`}) = $heaptype_typeuse(!($subst_typevar(_IDX_typevar(var_0), tv#16*{tv#16 <- `tv*`}, tu#16*{tu#16 <- `tu*`}))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_heaptype(rectype, n), tv#17*{tv#17 <- `tv*`}, tu#17*{tu#17 <- `tu*`}) = $heaptype_deftype($subst_deftype(_DEF_deftype(rectype, n), tv#18*{tv#18 <- `tv*`}, tu#18*{tu#18 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv#19*{tv#19 <- `tv*`}, tu#19*{tu#19 <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null#1?{null#1 <- `null?`}, ht), tv#20*{tv#20 <- `tv*`}, tu#20*{tu#20 <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null#2?{null#2 <- `null?`}, $subst_heaptype(ht, tv#21*{tv#21 <- `tv*`}, tu#21*{tu#21 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I32_valtype, tv#22*{tv#22 <- `tv*`}, tu#22*{tu#22 <- `tu*`}) = $valtype_numtype($subst_numtype(I32_numtype, tv#23*{tv#23 <- `tv*`}, tu#23*{tu#23 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I64_valtype, tv#24*{tv#24 <- `tv*`}, tu#24*{tu#24 <- `tu*`}) = $valtype_numtype($subst_numtype(I64_numtype, tv#25*{tv#25 <- `tv*`}, tu#25*{tu#25 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F32_valtype, tv#26*{tv#26 <- `tv*`}, tu#26*{tu#26 <- `tu*`}) = $valtype_numtype($subst_numtype(F32_numtype, tv#27*{tv#27 <- `tv*`}, tu#27*{tu#27 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F64_valtype, tv#28*{tv#28 <- `tv*`}, tu#28*{tu#28 <- `tu*`}) = $valtype_numtype($subst_numtype(F64_numtype, tv#29*{tv#29 <- `tv*`}, tu#29*{tu#29 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(V128_valtype, tv#30*{tv#30 <- `tv*`}, tu#30*{tu#30 <- `tu*`}) = $valtype_vectype($subst_vectype(V128_vectype, tv#31*{tv#31 <- `tv*`}, tu#31*{tu#31 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_valtype(`null?`, heaptype), tv#32*{tv#32 <- `tv*`}, tu#32*{tu#32 <- `tu*`}) = $valtype_reftype($subst_reftype(REF_reftype(`null?`, heaptype), tv#33*{tv#33 <- `tv*`}, tu#33*{tu#33 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv#34*{tv#34 <- `tv*`}, tu#34*{tu#34 <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_storagetype, tv#35*{tv#35 <- `tv*`}, tu#35*{tu#35 <- `tu*`}) = $storagetype_valtype($subst_valtype(BOT_valtype, tv#36*{tv#36 <- `tv*`}, tu#36*{tu#36 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_storagetype(`null?`, heaptype), tv#37*{tv#37 <- `tv*`}, tu#37*{tu#37 <- `tu*`}) = $storagetype_valtype($subst_valtype(REF_valtype(`null?`, heaptype), tv#38*{tv#38 <- `tv*`}, tu#38*{tu#38 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(V128_storagetype, tv#39*{tv#39 <- `tv*`}, tu#39*{tu#39 <- `tu*`}) = $storagetype_valtype($subst_valtype(V128_valtype, tv#40*{tv#40 <- `tv*`}, tu#40*{tu#40 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F64_storagetype, tv#41*{tv#41 <- `tv*`}, tu#41*{tu#41 <- `tu*`}) = $storagetype_valtype($subst_valtype(F64_valtype, tv#42*{tv#42 <- `tv*`}, tu#42*{tu#42 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F32_storagetype, tv#43*{tv#43 <- `tv*`}, tu#43*{tu#43 <- `tu*`}) = $storagetype_valtype($subst_valtype(F32_valtype, tv#44*{tv#44 <- `tv*`}, tu#44*{tu#44 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I64_storagetype, tv#45*{tv#45 <- `tv*`}, tu#45*{tu#45 <- `tu*`}) = $storagetype_valtype($subst_valtype(I64_valtype, tv#46*{tv#46 <- `tv*`}, tu#46*{tu#46 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I32_storagetype, tv#47*{tv#47 <- `tv*`}, tu#47*{tu#47 <- `tu*`}) = $storagetype_valtype($subst_valtype(I32_valtype, tv#48*{tv#48 <- `tv*`}, tu#48*{tu#48 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I8_storagetype, tv#49*{tv#49 <- `tv*`}, tu#49*{tu#49 <- `tu*`}) = $storagetype_packtype($subst_packtype(I8_packtype, tv#50*{tv#50 <- `tv*`}, tu#50*{tu#50 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I16_storagetype, tv#51*{tv#51 <- `tv*`}, tu#51*{tu#51 <- `tu*`}) = $storagetype_packtype($subst_packtype(I16_packtype, tv#52*{tv#52 <- `tv*`}, tu#52*{tu#52 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut#1?{mut#1 <- `mut?`}, zt), tv#53*{tv#53 <- `tv*`}, tu#53*{tu#53 <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut#2?{mut#2 <- `mut?`}, $subst_storagetype(zt, tv#54*{tv#54 <- `tv*`}, tu#54*{tu#54 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft#1*{ft#1 <- `ft*`},)), tv#55*{tv#55 <- `tv*`}, tu#55*{tu#55 <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft#2, tv#56*{tv#56 <- `tv*`}, tu#56*{tu#56 <- `tu*`})*{ft#2 <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv#57*{tv#57 <- `tv*`}, tu#57*{tu#57 <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv#58*{tv#58 <- `tv*`}, tu#58*{tu#58 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1#2*{t_1#2 <- `t_1*`},), `%`_resulttype(t_2#6*{t_2#6 <- `t_2*`},)), tv#59*{tv#59 <- `tv*`}, tu#59*{tu#59 <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1#3, tv#60*{tv#60 <- `tv*`}, tu#60*{tu#60 <- `tu*`})*{t_1#3 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2#7, tv#61*{tv#61 <- `tv*`}, tu#61*{tu#61 <- `tu*`})*{t_2#7 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final#1?{final#1 <- `final?`}, tu'#3*{tu'#3 <- `tu'*`}, ct), tv#62*{tv#62 <- `tv*`}, tu#62*{tu#62 <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final#2?{final#2 <- `final?`}, $subst_typeuse(tu'#4, tv#63*{tv#63 <- `tv*`}, tu#63*{tu#63 <- `tu*`})*{tu'#4 <- `tu'*`}, $subst_comptype(ct, tv#64*{tv#64 <- `tv*`}, tu#64*{tu#64 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st#1*{st#1 <- `st*`},)), tv#65*{tv#65 <- `tv*`}, tu#65*{tu#65 <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#3*{tv'#3 <- `tv'*`}, tu'#6*{tu'#6 <- `tu'*`}) = !($minus_recs(tv#66*{tv#66 <- `tv*`}, tu#66*{tu#66 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv#67*{tv#67 <- `tv*`}, tu#67*{tu#67 <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv#68*{tv#68 <- `tv*`}, tu#68*{tu#68 <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv#69*{tv#69 <- `tv*`}, tu#69*{tu#69 <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut#3?{mut#3 <- `mut?`}, t), tv#70*{tv#70 <- `tv*`}, tu#70*{tu#70 <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut#4?{mut#4 <- `mut?`}, $subst_valtype(t, tv#71*{tv#71 <- `tv*`}, tu#71*{tu#71 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv#72*{tv#72 <- `tv*`}, tu#72*{tu#72 <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv#73*{tv#73 <- `tv*`}, tu#73*{tu#73 <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv#74*{tv#74 <- `tv*`}, tu#74*{tu#74 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv#75*{tv#75 <- `tv*`}, tu#75*{tu#75 <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv#76*{tv#76 <- `tv*`}, tu#76*{tu#76 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv#77*{tv#77 <- `tv*`}, tu#77*{tu#77 <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv#78*{tv#78 <- `tv*`}, tu#78*{tu#78 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv#79*{tv#79 <- `tv*`}, tu#79*{tu#79 <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv#80*{tv#80 <- `tv*`}, tu#80*{tu#80 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv#81*{tv#81 <- `tv*`}, tu#81*{tu#81 <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv#82*{tv#82 <- `tv*`}, tu#82*{tu#82 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv#83*{tv#83 <- `tv*`}, tu#83*{tu#83 <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv#84*{tv#84 <- `tv*`}, tu#84*{tu#84 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1#1*{xt_1#1 <- `xt_1*`}, xt_2#1*{xt_2#1 <- `xt_2*`}), tv#85*{tv#85 <- `tv*`}, tu#85*{tu#85 <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1#2, tv#86*{tv#86 <- `tv*`}, tu#86*{tu#86 <- `tu*`})*{xt_1#2 <- `xt_1*`}, $subst_externtype(xt_2#2, tv#87*{tv#87 <- `tv*`}, tu#87*{tu#87 <- `tu*`})*{xt_2#2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu#88^n{tu#88 <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final#3?{final#3 <- `final?`}, typeuse#4*{typeuse#4 <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype#36*{subtype#36 <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut#6?{mut#6 <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1#1*{externtype_1#1 <- `externtype_1*`}, externtype_2#1*{externtype_2#1 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size($numtype_addrtype(Inn)), var_x) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn($numtype_Fnn(Fnn)), var_x) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = $lanetype_numtype(numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = $lanetype_packtype(packtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize($lanetype_Jnn(Jnn)), var_x) + -- if (lanetype = $lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = $storagetype_numtype(numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = $storagetype_vectype(vectype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = $storagetype_packtype(packtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1($numtype_addrtype(Inn_1)) < $sizenn2($numtype_addrtype(Inn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) > $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) < $sizenn2($numtype_Fnn(Fnn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) > $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * $proj_dim_0(dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = $lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2($lanetype_Jnn(Jnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2($numtype_Fnn(Fnn_2)) = $lsizenn1($lanetype_Jnn(Jnn_1))) /\ ($lsizenn1($lanetype_Jnn(Jnn_1)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2($numtype_Fnn(Fnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $sizenn2($numtype_Fnn(Fnn_2)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1($numtype_Fnn(Fnn_1))) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if ((($proj_sz_0(sz).0 * $proj_dim_0(M).0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +def $val_ref(ref) : val + def $val_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_val(x) + def $val_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_val + def $val_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_val(x) + def $val_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_val(x) + def $val_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_val(x) + def $val_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_val(x) + def $val_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_val(x) + def $val_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_val(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +def $instr_ref(ref) : instr + def $instr_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_instr(x) + def $instr_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_instr + def $instr_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_instr(x) + +def $instr_val(val) : instr + def $instr_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_instr(x0, x1) + def $instr_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_instr(x0, x1) + def $instr_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_instr(x) + def $instr_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_instr + def $instr_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_instr(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim($proj_bshape_0(bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= $lanetype_numtype($lunpack($lanetype(shape))))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I32_consttype, mk_lit__0_lit_(I32_numtype, c)) = CONST_instr(I32_numtype, c) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I64_consttype, mk_lit__0_lit_(I64_numtype, c)) = CONST_instr(I64_numtype, c) + -- wf_instr: `%`(CONST_instr(I64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F32_consttype, mk_lit__0_lit_(F32_numtype, c)) = CONST_instr(F32_numtype, c) + -- wf_instr: `%`(CONST_instr(F32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F64_consttype, mk_lit__0_lit_(F64_numtype, c)) = CONST_instr(F64_numtype, c) + -- wf_instr: `%`(CONST_instr(F64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : uN}(V128_consttype, mk_lit__1_lit_(V128_vectype, c)) = VCONST_instr(V128_vectype, c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype#361?{valtype#361 <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'#1*{labelidx'#1 <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'#2*{labelidx'#2 <- `labelidx'*`}) = [`%`_labelidx(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype#362*{valtype#362 <- `valtype*#1`}?{`valtype*#1` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr#2*{instr#2 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr#3*{instr#3 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1#1*{instr_1#1 <- `instr_1*`}, instr_2#1*{instr_2#1 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx#4*{labelidx#4 <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch#1*{catch#1 <- `catch*`},), instr#4*{instr#4 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx#1*{laneidx#1 <- `laneidx*`})) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx#15582?{sx#15582 <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx#15583?{sx#15583 <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx#15584?{sx#15584 <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop#1?{loadop#1 <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop#1?{storeop#1 <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop#1?{vloadop#1 <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr#5*{instr#5 <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr#6)*{instr#6 <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr#7*{instr#7 <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local#1*{local#1 <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte#1*{byte#1 <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr#360*{expr#360 <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type#1*{type#1 <- `type*`},), `%`_list(import#1*{import#1 <- `import*`},), `%`_list(tag#1*{tag#1 <- `tag*`},), `%`_list(global#1*{global#1 <- `global*`},), `%`_list(mem#4*{mem#4 <- `mem*`},), `%`_list(table#4*{table#4 <- `table*`},), `%`_list(func#1*{func#1 <- `func*`},), `%`_list(data#1*{data#1 <- `data*`},), `%`_list(elem#4*{elem#4 <- `elem*`},), start#1?{start#1 <- `start?`}, `%`_list(export#4*{export#4 <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func#2*{func#2 <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x#3*{x#3 <- `x*`}, [lct_1] ++ lct#1*{lct#1 <- `lct*`}) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt#2*{dt#2 <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, $typeuse_deftype(dt')*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'#3*{dt'#3 <- `dt'*`} = $clos_deftypes(dt#3*{dt#3 <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#4*{dt#4 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, $typeuse_deftype(dt')*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'#4*{dt'#4 <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#5*{dt#5 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#6*{dt#6 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#7*{dt#7 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{rectype : rectype, n : n, C : context}(C, _DEF_heaptype(rectype, n)) = $unrolldt(_DEF_deftype(rectype, n)) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, $heaptype_absheaptype(absheaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, $heaptype_typeuse(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, $valtype_numtype(numtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, $valtype_vectype(vectype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, $valtype_reftype(reftype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- if (C.TYPES_context[$proj_uN_0(typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, $typeuse_deftype(deftype)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, $storagetype_valtype(valtype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, $storagetype_packtype(packtype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- if (|`comptype'*`| = |`typeuse*`|) + -- if (|`comptype'*`| = |`typeuse'**`|) + -- (if ($unrollht_(C, $heaptype_typeuse(typeuse)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- if (|`ft_1*`| = |`ft_2*`|) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- if (i < |typeuse*{typeuse <- `typeuse*`}|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_typeuse(typeuse*{typeuse <- `typeuse*`}[i]), $heaptype_deftype(deftype_2)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, $heaptype_deftype(deftype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, $heaptype_deftype(deftype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, $heaptype_deftype(deftype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $heaptype_deftype(deftype_1), $heaptype_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_deftype(C.TYPES_context[$proj_uN_0(typeidx).0]), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, $heaptype_deftype(C.TYPES_context[$proj_uN_0(typeidx).0])) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), $heaptype_typeuse(typeuse*{typeuse <- `typeuse*`}[j])) + -- if (j < |typeuse*{typeuse <- `typeuse*`}|) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, $valtype_numtype(numtype_1), $valtype_numtype(numtype_2)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, $valtype_vectype(vectype_1), $valtype_vectype(vectype_2)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, $valtype_reftype(reftype_1), $valtype_reftype(reftype_2)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`t_1*`| = |`t_2*`|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, $storagetype_valtype(valtype_1), $storagetype_valtype(valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, $storagetype_packtype(packtype_1), $storagetype_packtype(packtype_2)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`lct*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`($typeuse_deftype(deftype), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- `x*`} + -- if (|`comptype'*`| = |`x*`|) + -- if (|`comptype'*`| = |`yy**`|) + -- (if ($proj_uN_0(x).0 < |C.TYPES_context|))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size($numtype_addrtype(addrtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size($numtype_addrtype(addrtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- if (|`t*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $typeuse_deftype(deftype_1), $typeuse_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype($typeuse_deftype(deftype_1)), FUNC_externtype($typeuse_deftype(deftype_2))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_1)),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_2)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I32_valtype) = ?(?(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I64_valtype) = ?(?(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F32_valtype) = ?(?(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F64_valtype) = ?(?(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(V128_valtype) = ?(?(VCONST_val(V128_vectype, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(V128_vectype, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size($numtype_addrtype(at)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= $storagetype_valtype($unpack(zt))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = $valtype_numtype(numtype)) \/ (t' = $valtype_vectype(vectype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if ($proj_uN_0(l).0 < |C.LABELS_context|))*{l <- `l*`} + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]))*{l <- `l*`} + -- if ($proj_uN_0(l').0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype($diffrt(rt_1, rt_2))],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype($diffrt(rt_1, rt_2))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_2)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_2)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (|C.REFS_context| > 0) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, $storagetype_reftype(rt)))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, $storagetype_reftype(rt))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = $valtype_numtype(numtype)) \/ ($unpack(zt) = $valtype_vectype(vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- if ($proj_uN_0(x_2).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Storagetype_sub: `%|-%<:%`(C, $storagetype_reftype(C.ELEMS_context[$proj_uN_0(y).0]), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = $valtype_numtype(numtype)) \/ ($unpack(zt) = $valtype_vectype(vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if ($proj_uN_0(x_2).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if ($proj_uN_0(x_2).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(Inn)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(Inn)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(Inn)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(Inn)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * $proj_dim_0(M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($dim($proj_bshape_0(sh).0)).0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr($numtype_addrtype(Inn), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (|[mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]| > 0) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr($numtype_addrtype(Inn), binop),) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_reftype(rt)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[$proj_uN_0(x).0]) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`lct*`| = |`local*`|) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_reftype(elemtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype($typeuse_deftype(dt))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(dt)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global#2*{global#2 <- `global*`}, mem#5*{mem#5 <- `mem*`}, table#5*{table#5 <- `table*`}, elem#5*{elem#5 <- `elem*`}, export#6*{export#6 <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global#3*{global#3 <- `global*`},), `%`_list(mem#6*{mem#6 <- `mem*`},), `%`_list(table#6*{table#6 <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem#6*{elem#6 <- `elem*`},), ?(), `%`_list(export#7*{export#7 <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- if (|`import*`| = |`xt_I*`|) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- if (|`jt*`| = |`tag*`|) + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- if (|`mem*`| = |`mt*`|) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- if (|`table*`| = |`tt*`|) + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- if (|`dt*`| = |`func*`|) + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- if (|`data*`| = |`ok*`|) + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- if (|`elem*`| = |`rt*`|) + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- if (|`export*`| = |`nm*`|) + -- if (|`export*`| = |`xt_E*`|) + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(BOT_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(V128_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I8_storagetype) = ?(S_sx) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I16_storagetype) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I32_lanetype) = mk_lane__2_lane_(I32_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I64_lanetype) = mk_lane__2_lane_(I64_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I8_lanetype) = mk_lane__2_lane_(I8_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I16_lanetype) = mk_lane__2_lane_(I16_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F32_lanetype) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn)))))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F64_lanetype) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I32_lanetype, c) = mk_lane__0_lane_(I32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I32_numtype), mk_lane__0_lane_(I32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I64_lanetype, c) = mk_lane__0_lane_(I64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I64_numtype), mk_lane__0_lane_(I64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F32_lanetype, c) = mk_lane__0_lane_(F32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F32_numtype), mk_lane__0_lane_(F32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F64_lanetype, c) = mk_lane__0_lane_(F64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F64_numtype), mk_lane__0_lane_(F64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I8_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I8_packtype), mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I16_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I16_packtype), mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I8_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I8_packtype), mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I16_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I16_packtype), mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I32_lanetype, mk_lane__0_lane_(I32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I64_lanetype, mk_lane__0_lane_(I64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F32_lanetype, mk_lane__0_lane_(F32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F64_lanetype, mk_lane__0_lane_(F64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I8_lanetype, mk_lane__1_lane_(I8_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I8_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I16_lanetype, mk_lane__1_lane_(I16_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I16_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I8_storagetype, mk_lit__2_lit_(I8_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I8_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I16_storagetype, mk_lit__2_lit_(I16_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I16_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#2)*{iter_0#2 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#1)))*{iter_0#1 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#4)*{iter_0#4 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#3)))*{iter_0#3 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#6)*{iter_0#6 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#5)))*{iter_0#5 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#8)*{iter_0#8 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#7)))*{iter_0#7 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#10)*{iter_0#10 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#9)))*{iter_0#9 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#12)*{iter_0#12 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#11)))*{iter_0#11 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#14)*{iter_0#14 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#13)))*{iter_0#13 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#16)*{iter_0#16 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#15)))*{iter_0#15 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#18)*{iter_0#18 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#17)))*{iter_0#17 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#20)*{iter_0#20 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#19)))*{iter_0#19 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#22)*{iter_0#22 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#21)))*{iter_0#21 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#24)*{iter_0#24 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#23)))*{iter_0#23 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#26)*{iter_0#26 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#25)))*{iter_0#25 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#28)*{iter_0#28 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#27)))*{iter_0#27 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#30)*{iter_0#30 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#29)))*{iter_0#29 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#32)*{iter_0#32 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#31)))*{iter_0#31 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#34)*{iter_0#34 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#33)))*{iter_0#33 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#36)*{iter_0#36 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#35)))*{iter_0#35 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#38)*{iter_0#38 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#37)))*{iter_0#37 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#40)*{iter_0#40 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#39)))*{iter_0#39 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#42)*{iter_0#42 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#41)))*{iter_0#41 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#44)*{iter_0#44 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#43)))*{iter_0#43 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#46)*{iter_0#46 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#45)))*{iter_0#45 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#48)*{iter_0#48 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#47)))*{iter_0#47 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#50)*{iter_0#50 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#49)))*{iter_0#49 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#52)*{iter_0#52 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#51)))*{iter_0#51 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#54)*{iter_0#54 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#53)))*{iter_0#53 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#56)*{iter_0#56 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#55)))*{iter_0#55 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#58)*{iter_0#58 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#57)))*{iter_0#57 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#60)*{iter_0#60 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#59)))*{iter_0#59 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#62)*{iter_0#62 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#61)))*{iter_0#61 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#64)*{iter_0#64 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#63)))*{iter_0#63 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn), mk_num__0_num_(I32_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I32_Inn)), i) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn), mk_num__0_num_(I64_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I64_Inn)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#66)*{iter_0#66 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#65)))*{iter_0#65 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#68)*{iter_0#68 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#67)))*{iter_0#67 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#70)*{iter_0#70 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#69)))*{iter_0#69 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#72)*{iter_0#72 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#71)))*{iter_0#71 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#74)*{iter_0#74 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#73)))*{iter_0#73 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#76)*{iter_0#76 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#75)))*{iter_0#75 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#78)*{iter_0#78 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#77)))*{iter_0#77 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#80)*{iter_0#80 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#79)))*{iter_0#79 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#82)*{iter_0#82 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#81)))*{iter_0#81 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#84)*{iter_0#84 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#83)))*{iter_0#83 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#86)*{iter_0#86 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#85)))*{iter_0#85 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#88)*{iter_0#88 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#87)))*{iter_0#87 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#90)*{iter_0#90 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#89)))*{iter_0#89 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#92)*{iter_0#92 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#91)))*{iter_0#91 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#94)*{iter_0#94 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#93)))*{iter_0#93 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#96)*{iter_0#96 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#95)))*{iter_0#95 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2753?{half#2753 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2755?{half#2755 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2757?{half#2757 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2759?{half#2759 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2761?{half#2761 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2763?{half#2763 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2765?{half#2765 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2767?{half#2767 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2753?{zero#2753 <- `zero?`}))) = zero#2754?{zero#2754 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2756?{zero#2756 <- `zero?`}))) = zero#2757?{zero#2757 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2759?{zero#2759 <- `zero?`}))) = zero#2760?{zero#2760 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2762?{zero#2762 <- `zero?`}))) = zero#2763?{zero#2763 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2765?{zero#2765 <- `zero?`}))) = zero#2766?{zero#2766 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2768?{zero#2768 <- `zero?`}))) = zero#2769?{zero#2769 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2771?{zero#2771 <- `zero?`}))) = zero#2772?{zero#2772 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2774?{zero#2774 <- `zero?`}))) = zero#2775?{zero#2775 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2777?{zero#2777 <- `zero?`}))) = zero#2778?{zero#2778 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2780?{zero#2780 <- `zero?`}))) = zero#2781?{zero#2781 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2783?{zero#2783 <- `zero?`}))) = zero#2784?{zero#2784 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2786?{zero#2786 <- `zero?`}))) = zero#2787?{zero#2787 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2789?{zero#2789 <- `zero?`}))) = zero#2790?{zero#2790 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2792?{zero#2792 <- `zero?`}))) = zero#2793?{zero#2793 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2795?{zero#2795 <- `zero?`}))) = zero#2796?{zero#2796 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2798?{zero#2798 <- `zero?`}))) = zero#2799?{zero#2799 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2801?{half#2801 <- `half?`}, sx))) = half#2802?{half#2802 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2804?{half#2804 <- `half?`}, sx))) = half#2805?{half#2805 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2807?{half#2807 <- `half?`}, sx))) = half#2808?{half#2808 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2810?{half#2810 <- `half?`}, sx))) = half#2811?{half#2811 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2813?{half#2813 <- `half?`}, sx))) = half#2814?{half#2814 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2816?{half#2816 <- `half?`}, sx))) = half#2817?{half#2817 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2819?{half#2819 <- `half?`}, sx))) = half#2820?{half#2820 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2822?{half#2822 <- `half?`}, sx))) = half#2823?{half#2823 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2801?{zero#2801 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2803?{zero#2803 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2805?{zero#2805 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2807?{zero#2807 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2809?{zero#2809 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2811?{zero#2811 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2813?{zero#2813 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2815?{zero#2815 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2817?{zero#2817 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2819?{zero#2819 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2821?{zero#2821 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2823?{zero#2823 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2825?{zero#2825 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2827?{zero#2827 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2829?{zero#2829 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2831?{zero#2831 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#1*{c#1 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#2*{c#2 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else (if ($signed_(N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[($proj_uN_0(i).0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#5)*{c#5 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#1*{c_1#1 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#3*{c#3 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#2)))*{c_1#2 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#4)))*{c#4 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#8)*{c#8 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#3*{c_1#3 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#6*{c#6 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#4)))*{c_1#4 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#7)))*{c#7 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#11)*{c#11 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#5*{c_1#5 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#9*{c#9 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#6)))*{c_1#6 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#10)))*{c#10 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#14)*{c#14 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#7*{c_1#7 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#12*{c#12 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#8)))*{c_1#8 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#13)))*{c#13 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#17)))*{c#17 <- `c*#3`})*{`c*#3` <- `c**`} + -- let{`c_1*` : lane_*} c_1#9*{c_1#9 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c**` : lane_**} c#15*{c#15 <- `c*#1`}*{`c*#1` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#97))*{iter_0#97 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#10)))))}*{c_1#10 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#16)))))*{c#16 <- `c*#2`}*{`c*#2` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#98))))*{iter_0#98 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#11)))))}*{c_1#11 <- `c_1*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#20)))*{c#20 <- `c*#6`})*{`c*#6` <- `c**`} + -- let{`c_1*` : lane_*} c_1#12*{c_1#12 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c**` : lane_**} c#18*{c#18 <- `c*#4`}*{`c*#4` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#99))*{iter_0#99 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#13)))))}*{c_1#13 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#19)))))*{c#19 <- `c*#5`}*{`c*#5` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#100))))*{iter_0#100 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#14)))))}*{c_1#14 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#23)*{c#23 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#15*{c_1#15 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#1*{c_2#1 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#21*{c#21 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#16)), !($proj_lane__2(c_2#2)))*{c_1#16 <- `c_1*`, c_2#2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#22)))*{c#22 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#26)*{c#26 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#17*{c_1#17 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#3*{c_2#3 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#24*{c#24 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#18)), !($proj_lane__2(c_2#4)))*{c_1#18 <- `c_1*`, c_2#4 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#25)))*{c#25 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#29)*{c#29 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#19*{c_1#19 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#5*{c_2#5 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#27*{c#27 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#20)), !($proj_lane__2(c_2#6)))*{c_1#20 <- `c_1*`, c_2#6 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#28)))*{c#28 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#32)*{c#32 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#21*{c_1#21 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#7*{c_2#7 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#30*{c#30 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#22)), !($proj_lane__2(c_2#8)))*{c_1#22 <- `c_1*`, c_2#8 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#31)))*{c#31 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#35)*{c#35 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#23*{c_1#23 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#9*{c_2#9 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#33*{c#33 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#24)), !($proj_lane__2(c_2#10)))*{c_1#24 <- `c_1*`, c_2#10 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#34)))*{c#34 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#38)*{c#38 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#25*{c_1#25 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#11*{c_2#11 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#36*{c#36 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#26)), !($proj_lane__2(c_2#12)))*{c_1#26 <- `c_1*`, c_2#12 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#37)))*{c#37 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#41)*{c#41 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#27*{c_1#27 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#13*{c_2#13 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#39*{c#39 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#28)), !($proj_lane__2(c_2#14)))*{c_1#28 <- `c_1*`, c_2#14 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#40)))*{c#40 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#44)*{c#44 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#29*{c_1#29 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#15*{c_2#15 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#42*{c#42 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#30)), !($proj_lane__2(c_2#16)))*{c_1#30 <- `c_1*`, c_2#16 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#43)))*{c#43 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#47)))*{c#47 <- `c*#9`})*{`c*#9` <- `c**`} + -- let{`c_1*` : lane_*} c_1#31*{c_1#31 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#17*{c_2#17 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c**` : lane_**} c#45*{c#45 <- `c*#7`}*{`c*#7` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#101)*{iter_0#101 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#32)), !($proj_lane__2(c_2#18)))}*{c_1#32 <- `c_1*`, c_2#18 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#46)))))*{c#46 <- `c*#8`}*{`c*#8` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#102)))*{iter_0#102 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#33)), !($proj_lane__2(c_2#19)))}*{c_1#33 <- `c_1*`, c_2#19 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#50)))*{c#50 <- `c*#12`})*{`c*#12` <- `c**`} + -- let{`c_1*` : lane_*} c_1#34*{c_1#34 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#20*{c_2#20 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c**` : lane_**} c#48*{c#48 <- `c*#10`}*{`c*#10` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#103)*{iter_0#103 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#35)), !($proj_lane__2(c_2#21)))}*{c_1#35 <- `c_1*`, c_2#21 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#49)))))*{c#49 <- `c*#11`}*{`c*#11` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#104)))*{iter_0#104 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#36)), !($proj_lane__2(c_2#22)))}*{c_1#36 <- `c_1*`, c_2#22 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#53)))*{c#53 <- `c*#15`})*{`c*#15` <- `c**`} + -- let{`c_1*` : lane_*} c_1#37*{c_1#37 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#23*{c_2#23 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c**` : lane_**} c#51*{c#51 <- `c*#13`}*{`c*#13` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#105)*{iter_0#105 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#38)), !($proj_lane__2(c_2#24)))}*{c_1#38 <- `c_1*`, c_2#24 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#52)))))*{c#52 <- `c*#14`}*{`c*#14` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#106)))*{iter_0#106 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#39)), !($proj_lane__2(c_2#25)))}*{c_1#39 <- `c_1*`, c_2#25 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#56)))*{c#56 <- `c*#18`})*{`c*#18` <- `c**`} + -- let{`c_1*` : lane_*} c_1#40*{c_1#40 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#26*{c_2#26 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c**` : lane_**} c#54*{c#54 <- `c*#16`}*{`c*#16` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#107)*{iter_0#107 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#41)), !($proj_lane__2(c_2#27)))}*{c_1#41 <- `c_1*`, c_2#27 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#55)))))*{c#55 <- `c*#17`}*{`c*#17` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#108)))*{iter_0#108 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#42)), !($proj_lane__2(c_2#28)))}*{c_1#42 <- `c_1*`, c_2#28 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#59)))*{c#59 <- `c*#21`})*{`c*#21` <- `c**`} + -- let{`c_1*` : lane_*} c_1#43*{c_1#43 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#29*{c_2#29 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c**` : lane_**} c#57*{c#57 <- `c*#19`}*{`c*#19` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#109))*{iter_0#109 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#44)))), !($proj_num__1(!($proj_lane__0(c_2#30)))))}*{c_1#44 <- `c_1*`, c_2#30 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#58)))))*{c#58 <- `c*#20`}*{`c*#20` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#110))))*{iter_0#110 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#45)))), !($proj_num__1(!($proj_lane__0(c_2#31)))))}*{c_1#45 <- `c_1*`, c_2#31 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#62)))*{c#62 <- `c*#24`})*{`c*#24` <- `c**`} + -- let{`c_1*` : lane_*} c_1#46*{c_1#46 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#32*{c_2#32 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c**` : lane_**} c#60*{c#60 <- `c*#22`}*{`c*#22` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#111))*{iter_0#111 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#47)))), !($proj_num__1(!($proj_lane__0(c_2#33)))))}*{c_1#47 <- `c_1*`, c_2#33 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#61)))))*{c#61 <- `c*#23`}*{`c*#23` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#112))))*{iter_0#112 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#48)))), !($proj_num__1(!($proj_lane__0(c_2#34)))))}*{c_1#48 <- `c_1*`, c_2#34 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#65)))*{c#65 <- `c*#27`})*{`c*#27` <- `c**`} + -- let{`c_1*` : lane_*} c_1#49*{c_1#49 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#35*{c_2#35 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#1*{c_3#1 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_3) + -- let{`c**` : lane_**} c#63*{c#63 <- `c*#25`}*{`c*#25` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#113)*{iter_0#113 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#50)), !($proj_lane__2(c_2#36)), !($proj_lane__2(c_3#2)))}*{c_1#50 <- `c_1*`, c_2#36 <- `c_2*`, c_3#2 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#64)))))*{c#64 <- `c*#26`}*{`c*#26` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#114)))*{iter_0#114 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#51)), !($proj_lane__2(c_2#37)), !($proj_lane__2(c_3#3)))}*{c_1#51 <- `c_1*`, c_2#37 <- `c_2*`, c_3#3 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#68)))*{c#68 <- `c*#30`})*{`c*#30` <- `c**`} + -- let{`c_1*` : lane_*} c_1#52*{c_1#52 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#38*{c_2#38 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#4*{c_3#4 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_3) + -- let{`c**` : lane_**} c#66*{c#66 <- `c*#28`}*{`c*#28` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#115)*{iter_0#115 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#53)), !($proj_lane__2(c_2#39)), !($proj_lane__2(c_3#5)))}*{c_1#53 <- `c_1*`, c_2#39 <- `c_2*`, c_3#5 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#67)))))*{c#67 <- `c*#29`}*{`c*#29` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#116)))*{iter_0#116 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#54)), !($proj_lane__2(c_2#40)), !($proj_lane__2(c_3#6)))}*{c_1#54 <- `c_1*`, c_2#40 <- `c_2*`, c_3#6 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#71)))*{c#71 <- `c*#33`})*{`c*#33` <- `c**`} + -- let{`c_1*` : lane_*} c_1#55*{c_1#55 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#41*{c_2#41 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#7*{c_3#7 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_3) + -- let{`c**` : lane_**} c#69*{c#69 <- `c*#31`}*{`c*#31` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#117)*{iter_0#117 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#56)), !($proj_lane__2(c_2#42)), !($proj_lane__2(c_3#8)))}*{c_1#56 <- `c_1*`, c_2#42 <- `c_2*`, c_3#8 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#70)))))*{c#70 <- `c*#32`}*{`c*#32` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#118)))*{iter_0#118 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#57)), !($proj_lane__2(c_2#43)), !($proj_lane__2(c_3#9)))}*{c_1#57 <- `c_1*`, c_2#43 <- `c_2*`, c_3#9 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#74)))*{c#74 <- `c*#36`})*{`c*#36` <- `c**`} + -- let{`c_1*` : lane_*} c_1#58*{c_1#58 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#44*{c_2#44 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#10*{c_3#10 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_3) + -- let{`c**` : lane_**} c#72*{c#72 <- `c*#34`}*{`c*#34` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#119)*{iter_0#119 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#59)), !($proj_lane__2(c_2#45)), !($proj_lane__2(c_3#11)))}*{c_1#59 <- `c_1*`, c_2#45 <- `c_2*`, c_3#11 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#73)))))*{c#73 <- `c*#35`}*{`c*#35` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#120)))*{iter_0#120 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#60)), !($proj_lane__2(c_2#46)), !($proj_lane__2(c_3#12)))}*{c_1#60 <- `c_1*`, c_2#46 <- `c_2*`, c_3#12 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#77)))*{c#77 <- `c*#39`})*{`c*#39` <- `c**`} + -- let{`c_1*` : lane_*} c_1#61*{c_1#61 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#47*{c_2#47 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#13*{c_3#13 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_3) + -- let{`c**` : lane_**} c#75*{c#75 <- `c*#37`}*{`c*#37` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#121))*{iter_0#121 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#62)))), !($proj_num__1(!($proj_lane__0(c_2#48)))), !($proj_num__1(!($proj_lane__0(c_3#14)))))}*{c_1#62 <- `c_1*`, c_2#48 <- `c_2*`, c_3#14 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#76)))))*{c#76 <- `c*#38`}*{`c*#38` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#122))))*{iter_0#122 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#63)))), !($proj_num__1(!($proj_lane__0(c_2#49)))), !($proj_num__1(!($proj_lane__0(c_3#15)))))}*{c_1#63 <- `c_1*`, c_2#49 <- `c_2*`, c_3#15 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#80)))*{c#80 <- `c*#42`})*{`c*#42` <- `c**`} + -- let{`c_1*` : lane_*} c_1#64*{c_1#64 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#50*{c_2#50 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#16*{c_3#16 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_3) + -- let{`c**` : lane_**} c#78*{c#78 <- `c*#40`}*{`c*#40` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#123))*{iter_0#123 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#65)))), !($proj_num__1(!($proj_lane__0(c_2#51)))), !($proj_num__1(!($proj_lane__0(c_3#17)))))}*{c_1#65 <- `c_1*`, c_2#51 <- `c_2*`, c_3#17 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#79)))))*{c#79 <- `c*#41`}*{`c*#41` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#124))))*{iter_0#124 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#66)))), !($proj_num__1(!($proj_lane__0(c_2#52)))), !($proj_num__1(!($proj_lane__0(c_3#18)))))}*{c_1#66 <- `c_1*`, c_2#52 <- `c_2*`, c_3#18 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#83)*{c#83 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#67*{c_1#67 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#53*{c_2#53 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#81*{c#81 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#68)), !($proj_lane__2(c_2#54)))).0,))*{c_1#68 <- `c_1*`, c_2#54 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#82)))*{c#82 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#69)), !($proj_lane__2(c_2#55)))).0,)))*{c_1#69 <- `c_1*`, c_2#55 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#86)*{c#86 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#70*{c_1#70 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#56*{c_2#56 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#84*{c#84 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#71)), !($proj_lane__2(c_2#57)))).0,))*{c_1#71 <- `c_1*`, c_2#57 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#85)))*{c#85 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#72)), !($proj_lane__2(c_2#58)))).0,)))*{c_1#72 <- `c_1*`, c_2#58 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#89)*{c#89 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#73*{c_1#73 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#59*{c_2#59 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#87*{c#87 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#74)), !($proj_lane__2(c_2#60)))).0,))*{c_1#74 <- `c_1*`, c_2#60 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#88)))*{c#88 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#75)), !($proj_lane__2(c_2#61)))).0,)))*{c_1#75 <- `c_1*`, c_2#61 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#92)*{c#92 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#76*{c_1#76 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#62*{c_2#62 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#90*{c#90 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#77)), !($proj_lane__2(c_2#63)))).0,))*{c_1#77 <- `c_1*`, c_2#63 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#91)))*{c#91 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#78)), !($proj_lane__2(c_2#64)))).0,)))*{c_1#78 <- `c_1*`, c_2#64 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#95)*{c#95 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#79*{c_1#79 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#65*{c_2#65 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#93*{c#93 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#80)), !($proj_lane__2(c_2#66)))).0,))*{c_1#80 <- `c_1*`, c_2#66 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#94)))*{c#94 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#81)), !($proj_lane__2(c_2#67)))).0,)))*{c_1#81 <- `c_1*`, c_2#67 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#98)*{c#98 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#82*{c_1#82 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#68*{c_2#68 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#96*{c#96 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#83)), !($proj_lane__2(c_2#69)))).0,))*{c_1#83 <- `c_1*`, c_2#69 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#97)))*{c#97 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#84)), !($proj_lane__2(c_2#70)))).0,)))*{c_1#84 <- `c_1*`, c_2#70 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#101)*{c#101 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#85*{c_1#85 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#71*{c_2#71 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#99*{c#99 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#86)), !($proj_lane__2(c_2#72)))).0,))*{c_1#86 <- `c_1*`, c_2#72 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#100)))*{c#100 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#87)), !($proj_lane__2(c_2#73)))).0,)))*{c_1#87 <- `c_1*`, c_2#73 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#104)*{c#104 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#88*{c_1#88 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#74*{c_2#74 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#102*{c#102 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#89)), !($proj_lane__2(c_2#75)))).0,))*{c_1#89 <- `c_1*`, c_2#75 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#103)))*{c#103 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#90)), !($proj_lane__2(c_2#76)))).0,)))*{c_1#90 <- `c_1*`, c_2#76 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(Inn), M), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#107).0,)))*{c#107 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#91*{c_1#91 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#77*{c_2#77 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c*` : iN*} c#105*{c#105 <- `c*`} = $extend__(1, $sizenn($numtype_Fnn(F32_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#92)))), !($proj_num__1(!($proj_lane__0(c_2#78)))))).0,))*{c_1#92 <- `c_1*`, c_2#78 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F32_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(Inn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(Inn), M)), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#106).0,)))))*{c#106 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#93)))), !($proj_num__1(!($proj_lane__0(c_2#79)))))).0,)))*{c_1#93 <- `c_1*`, c_2#79 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(Inn), M), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#110).0,)))*{c#110 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#94*{c_1#94 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#80*{c_2#80 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c*` : iN*} c#108*{c#108 <- `c*`} = $extend__(1, $sizenn($numtype_Fnn(F64_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#95)))), !($proj_num__1(!($proj_lane__0(c_2#81)))))).0,))*{c_1#95 <- `c_1*`, c_2#81 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F64_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(Inn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(Inn), M)), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#109).0,)))))*{c#109 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#96)))), !($proj_num__1(!($proj_lane__0(c_2#82)))))).0,)))*{c_1#96 <- `c_1*`, c_2#82 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#113)*{c#113 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#97*{c_1#97 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#111*{c#111 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#98)), `%`_iN($proj_uN_0(i).0,))*{c_1#98 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#112)))*{c#112 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#116)*{c#116 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#99*{c_1#99 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#114*{c#114 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#100)), `%`_iN($proj_uN_0(i).0,))*{c_1#100 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#115)))*{c#115 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#119)*{c#119 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#101*{c_1#101 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#117*{c#117 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#102)), `%`_iN($proj_uN_0(i).0,))*{c_1#102 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#118)))*{c#118 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#122)*{c#122 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#103*{c_1#103 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#120*{c#120 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#104)), `%`_iN($proj_uN_0(i).0,))*{c_1#104 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#121)))*{c#121 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#125)*{c#125 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#105*{c_1#105 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#123*{c#123 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#106)), `%`_iN($proj_uN_0(i).0,))*{c_1#106 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#124)))*{c#124 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#128)*{c#128 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#107*{c_1#107 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#126*{c#126 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#108)), `%`_iN($proj_uN_0(i).0,))*{c_1#108 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#127)))*{c#127 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#131)*{c#131 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#109*{c_1#109 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#129*{c#129 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#110)), `%`_iN($proj_uN_0(i).0,))*{c_1#110 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#130)))*{c#130 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#134)*{c#134 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#111*{c_1#111 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#132*{c#132 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#112)), `%`_iN($proj_uN_0(i).0,))*{c_1#112 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#133)))*{c#133 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I32_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#113*{c_1#113 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#114)), `%`_iN(0,))).0,)*{c_1#114 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#115)), `%`_iN(0,))).0,),))*{c_1#115 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I64_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#116*{c_1#116 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#117)), `%`_iN(0,))).0,)*{c_1#117 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#118)), `%`_iN(0,))).0,),))*{c_1#118 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I8_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#119*{c_1#119 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#120)), `%`_iN(0,))).0,)*{c_1#120 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#121)), `%`_iN(0,))).0,),))*{c_1#121 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I16_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#122*{c_1#122 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#123)), `%`_iN(0,))).0,)*{c_1#123 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#124)), `%`_iN(0,))).0,),))*{c_1#124 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#137)*{c#137 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#125*{c_1#125 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#83*{c_2#83 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#135*{c#135 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#126))*{c_1#126 <- `c_1*`}, !($proj_lane__2(c_2#84)))*{c_2#84 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#136)))*{c#136 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#140)*{c#140 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#127*{c_1#127 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#85*{c_2#85 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#138*{c#138 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#128))*{c_1#128 <- `c_1*`}, !($proj_lane__2(c_2#86)))*{c_2#86 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#139)))*{c#139 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#143)*{c#143 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#129*{c_1#129 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#87*{c_2#87 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#141*{c#141 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#130))*{c_1#130 <- `c_1*`}, !($proj_lane__2(c_2#88)))*{c_2#88 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#142)))*{c#142 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#146)*{c#146 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#131*{c_1#131 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#89*{c_2#89 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#144*{c#144 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#132))*{c_1#132 <- `c_1*`}, !($proj_lane__2(c_2#90)))*{c_2#90 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#145)))*{c#145 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), i#93310*{i#93310 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), c#148*{c#148 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#133*{c_1#133 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#91*{c_2#91 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : lane_*} c#147*{c#147 <- `c*`} = c_1#134*{c_1#134 <- `c_1*`} ++ c_2#92*{c_2#92 <- `c_2*`}[$proj_uN_0(i#93311).0]*{i#93311 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), i#93313*{i#93313 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), c#150*{c#150 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#135*{c_1#135 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#93*{c_2#93 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : lane_*} c#149*{c#149 <- `c*`} = c_1#136*{c_1#136 <- `c_1*`} ++ c_2#94*{c_2#94 <- `c_2*`}[$proj_uN_0(i#93314).0]*{i#93314 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), i#93316*{i#93316 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), c#152*{c#152 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#137*{c_1#137 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#95*{c_2#95 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : lane_*} c#151*{c#151 <- `c*`} = c_1#138*{c_1#138 <- `c_1*`} ++ c_2#96*{c_2#96 <- `c_2*`}[$proj_uN_0(i#93317).0]*{i#93317 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), i#93319*{i#93319 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), c#154*{c#154 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#139*{c_1#139 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#97*{c_2#97 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : lane_*} c#153*{c#153 <- `c*`} = c_1#140*{c_1#140 <- `c_1*`} ++ c_2#98*{c_2#98 <- `c_2*`}[$proj_uN_0(i#93320).0]*{i#93320 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), mk_vternop__0_vternop_(I32_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), mk_vternop__0_vternop_(I64_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), mk_vternop__0_vternop_(I8_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), mk_vternop__0_vternop_(I16_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2857?{half#2857 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2859?{half#2859 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2861?{half#2861 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2863?{half#2863 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2865?{half#2865 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2867?{half#2867 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2869?{half#2869 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2871?{half#2871 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2833?{zero#2833 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#157))?{c#157 <- `c?`}) + -- let{`c?` : iN?} c#155?{c#155 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#156))))?{c#156 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2835?{zero#2835 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#160))?{c#160 <- `c?`}) + -- let{`c?` : iN?} c#158?{c#158 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#159))))?{c#159 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2837?{zero#2837 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#163))?{c#163 <- `c?`}) + -- let{`c?` : iN?} c#161?{c#161 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#162))))?{c#162 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2839?{zero#2839 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#166))?{c#166 <- `c?`}) + -- let{`c?` : iN?} c#164?{c#164 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#165))))?{c#165 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2841?{zero#2841 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#169))?{c#169 <- `c?`}) + -- let{`c?` : iN?} c#167?{c#167 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#168))))?{c#168 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2843?{zero#2843 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#172))?{c#172 <- `c?`}) + -- let{`c?` : iN?} c#170?{c#170 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#171))))?{c#171 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2845?{zero#2845 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#175))?{c#175 <- `c?`}) + -- let{`c?` : iN?} c#173?{c#173 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#174))))?{c#174 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2847?{zero#2847 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#178))?{c#178 <- `c?`}) + -- let{`c?` : iN?} c#176?{c#176 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#177))))?{c#177 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2849?{zero#2849 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#181))?{c#181 <- `c?`}) + -- let{`c?` : iN?} c#179?{c#179 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#180))))?{c#180 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2851?{zero#2851 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#184))?{c#184 <- `c?`}) + -- let{`c?` : iN?} c#182?{c#182 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#183))))?{c#183 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2853?{zero#2853 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#187))?{c#187 <- `c?`}) + -- let{`c?` : iN?} c#185?{c#185 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#186))))?{c#186 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2855?{zero#2855 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#190))?{c#190 <- `c?`}) + -- let{`c?` : iN?} c#188?{c#188 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#189))))?{c#189 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2857?{zero#2857 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#193))?{c#193 <- `c?`}) + -- let{`c?` : iN?} c#191?{c#191 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#192))))?{c#192 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2859?{zero#2859 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#196))?{c#196 <- `c?`}) + -- let{`c?` : iN?} c#194?{c#194 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#195))))?{c#195 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2861?{zero#2861 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#199))?{c#199 <- `c?`}) + -- let{`c?` : iN?} c#197?{c#197 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#198))))?{c#198 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2863?{zero#2863 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#202))?{c#202 <- `c?`}) + -- let{`c?` : iN?} c#200?{c#200 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#201))))?{c#201 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2865?{zero#2865 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#205))?{c#205 <- `c?`}) + -- let{`c?` : iN?} c#203?{c#203 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#204))))?{c#204 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2867?{zero#2867 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#208))?{c#208 <- `c?`}) + -- let{`c?` : iN?} c#206?{c#206 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#207))))?{c#207 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2869?{zero#2869 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#211))?{c#211 <- `c?`}) + -- let{`c?` : iN?} c#209?{c#209 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#210))))?{c#210 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2871?{zero#2871 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#214))?{c#214 <- `c?`}) + -- let{`c?` : iN?} c#212?{c#212 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#213))))?{c#213 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2873?{zero#2873 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#217))?{c#217 <- `c?`}) + -- let{`c?` : iN?} c#215?{c#215 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#216))))?{c#216 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2875?{zero#2875 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#220))?{c#220 <- `c?`}) + -- let{`c?` : iN?} c#218?{c#218 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#219))))?{c#219 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2877?{zero#2877 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#223))?{c#223 <- `c?`}) + -- let{`c?` : iN?} c#221?{c#221 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#222))))?{c#222 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2879?{zero#2879 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#226))?{c#226 <- `c?`}) + -- let{`c?` : iN?} c#224?{c#224 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#225))))?{c#225 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2881?{zero#2881 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#229))?{c#229 <- `c?`}) + -- let{`c?` : iN?} c#227?{c#227 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#228))))?{c#228 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2883?{zero#2883 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#232))?{c#232 <- `c?`}) + -- let{`c?` : iN?} c#230?{c#230 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#231))))?{c#231 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2885?{zero#2885 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#235))?{c#235 <- `c?`}) + -- let{`c?` : iN?} c#233?{c#233 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#234))))?{c#234 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2887?{zero#2887 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#238))?{c#238 <- `c?`}) + -- let{`c?` : iN?} c#236?{c#236 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#237))))?{c#237 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2889?{zero#2889 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#241))?{c#241 <- `c?`}) + -- let{`c?` : iN?} c#239?{c#239 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#240))))?{c#240 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2891?{zero#2891 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#244))?{c#244 <- `c?`}) + -- let{`c?` : iN?} c#242?{c#242 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#243))))?{c#243 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2893?{zero#2893 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#247))?{c#247 <- `c?`}) + -- let{`c?` : iN?} c#245?{c#245 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#246))))?{c#246 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2895?{zero#2895 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#250))?{c#250 <- `c?`}) + -- let{`c?` : iN?} c#248?{c#248 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#249))))?{c#249 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#253))*{c#253 <- `c*`} + -- let{`c*` : fN*} c#251*{c#251 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#252))))*{c#252 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#256))*{c#256 <- `c*`} + -- let{`c*` : fN*} c#254*{c#254 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#255))))*{c#255 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#259))*{c#259 <- `c*`} + -- let{`c*` : fN*} c#257*{c#257 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#258))))*{c#258 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#262))*{c#262 <- `c*`} + -- let{`c*` : fN*} c#260*{c#260 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#261))))*{c#261 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#265))*{c#265 <- `c*`} + -- let{`c*` : fN*} c#263*{c#263 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#264))))*{c#264 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#268))*{c#268 <- `c*`} + -- let{`c*` : fN*} c#266*{c#266 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#267))))*{c#267 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#271))*{c#271 <- `c*`} + -- let{`c*` : fN*} c#269*{c#269 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#270))))*{c#270 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#274))*{c#274 <- `c*`} + -- let{`c*` : fN*} c#272*{c#272 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#273))))*{c#273 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#277))*{c#277 <- `c*`} + -- let{`c*` : fN*} c#275*{c#275 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#276))))*{c#276 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#280))*{c#280 <- `c*`} + -- let{`c*` : fN*} c#278*{c#278 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#279))))*{c#279 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#283))*{c#283 <- `c*`} + -- let{`c*` : fN*} c#281*{c#281 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#282))))*{c#282 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#286))*{c#286 <- `c*`} + -- let{`c*` : fN*} c#284*{c#284 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#285))))*{c#285 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#289))*{c#289 <- `c*`} + -- let{`c*` : fN*} c#287*{c#287 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#288))))*{c#288 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#292))*{c#292 <- `c*`} + -- let{`c*` : fN*} c#290*{c#290 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#291))))*{c#291 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#295))*{c#295 <- `c*`} + -- let{`c*` : fN*} c#293*{c#293 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#294))))*{c#294 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#298))*{c#298 <- `c*`} + -- let{`c*` : fN*} c#296*{c#296 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#297))))*{c#297 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1#141*{c_1#141 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c#299*{c#299 <- `c*#43`}*{`c*#43` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1#142)*{c_1#142 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c#300*{c#300 <- `c*#44`})*{`c*#44` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1#143*{c_1#143 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{`c**` : lane_**} c#301*{c#301 <- `c*#45`}*{`c*#45` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#144)*{c_1#144 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#302*{c#302 <- `c*#46`})*{`c*#46` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1#145*{c_1#145 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c#303*{c#303 <- `c*#47`}*{`c*#47` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#146)*{c_1#146 <- `c_1*`} ++ [$zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#304*{c#304 <- `c*#48`})*{`c*#48` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i#93357*{i#93357 <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#147*{c_1#147 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#99*{c_2#99 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#1*{c'_1#1 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#148)))*{c_1#148 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#1*{c'_2#1 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#100)))*{c_2#100 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#2)*{c'_1#2 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#2)*{c'_2#2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#3)))*{c'_1#3 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#3)))*{c'_2#3 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#149*{c_1#149 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#101*{c_2#101 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#4*{c'_1#4 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#150)))*{c_1#150 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#4*{c'_2#4 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#102)))*{c_2#102 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#5)*{c'_1#5 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#5)*{c'_2#5 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#6)))*{c'_1#6 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#6)))*{c'_2#6 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#151*{c_1#151 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#103*{c_2#103 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#7*{c'_1#7 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#152)))*{c_1#152 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#7*{c'_2#7 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#104)))*{c_2#104 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#8)*{c'_1#8 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#8)*{c'_2#8 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#9)))*{c'_1#9 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#9)))*{c'_2#9 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#153*{c_1#153 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#105*{c_2#105 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#10*{c'_1#10 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#154)))*{c_1#154 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#10*{c'_2#10 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#106)))*{c_2#106 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#11)*{c'_1#11 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#11)*{c'_2#11 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#12)))*{c'_1#12 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#12)))*{c'_2#12 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#155*{c_1#155 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#107*{c_2#107 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#13*{c'_1#13 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#156)))*{c_1#156 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#13*{c'_2#13 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#108)))*{c_2#108 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#14)*{c'_1#14 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#14)*{c'_2#14 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#15)))*{c'_1#15 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#15)))*{c'_2#15 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#157*{c_1#157 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#109*{c_2#109 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#16*{c'_1#16 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#158)))*{c_1#158 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#16*{c'_2#16 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#110)))*{c_2#110 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#17)*{c'_1#17 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#17)*{c'_2#17 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#18)))*{c'_1#18 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#18)))*{c'_2#18 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#159*{c_1#159 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#111*{c_2#111 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#19*{c'_1#19 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#160)))*{c_1#160 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#19*{c'_2#19 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#112)))*{c_2#112 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#20)*{c'_1#20 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#20)*{c'_2#20 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#21)))*{c'_1#21 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#21)))*{c'_2#21 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#161*{c_1#161 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#113*{c_2#113 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#22*{c'_1#22 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#162)))*{c_1#162 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#22*{c'_2#22 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#114)))*{c_2#114 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#23)*{c'_1#23 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#23)*{c'_2#23 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#24)))*{c'_1#24 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#24)))*{c'_2#24 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#163*{c_1#163 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#115*{c_2#115 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#25*{c'_1#25 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#164)))*{c_1#164 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#25*{c'_2#25 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#116)))*{c_2#116 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#26)*{c'_1#26 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#26)*{c'_2#26 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#27)))*{c'_1#27 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#27)))*{c'_2#27 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#165*{c_1#165 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#117*{c_2#117 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#28*{c'_1#28 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#166)))*{c_1#166 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#28*{c'_2#28 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#118)))*{c_2#118 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#29)*{c'_1#29 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#29)*{c'_2#29 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#30)))*{c'_1#30 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#30)))*{c'_2#30 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#167*{c_1#167 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#119*{c_2#119 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#31*{c'_1#31 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#168)))*{c_1#168 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#31*{c'_2#31 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#120)))*{c_2#120 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#32)*{c'_1#32 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#32)*{c'_2#32 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#33)))*{c'_1#33 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#33)))*{c'_2#33 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#169*{c_1#169 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#121*{c_2#121 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#34*{c'_1#34 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#170)))*{c_1#170 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#34*{c'_2#34 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#122)))*{c_2#122 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#35)*{c'_1#35 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#35)*{c'_2#35 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#36)))*{c'_1#36 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#36)))*{c'_2#36 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#171*{c_1#171 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#123*{c_2#123 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#37*{c'_1#37 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#172)))*{c_1#172 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#37*{c'_2#37 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#124)))*{c_2#124 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#38)*{c'_1#38 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#38)*{c'_2#38 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#39)))*{c'_1#39 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#39)))*{c'_2#39 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#173*{c_1#173 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#125*{c_2#125 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#40*{c'_1#40 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#174)))*{c_1#174 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#40*{c'_2#40 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#126)))*{c_2#126 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#41)*{c'_1#41 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#41)*{c'_2#41 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#42)))*{c'_1#42 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#42)))*{c'_2#42 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#175*{c_1#175 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#127*{c_2#127 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#43*{c'_1#43 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#176)))*{c_1#176 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#43*{c'_2#43 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#128)))*{c_2#128 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#44)*{c'_1#44 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#44)*{c'_2#44 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#45)))*{c'_1#45 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#45)))*{c'_2#45 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#177*{c_1#177 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#129*{c_2#129 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#46*{c'_1#46 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#178)))*{c_1#178 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#46*{c'_2#46 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#130)))*{c_2#130 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#47)*{c'_1#47 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#47)*{c'_2#47 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#48)))*{c'_1#48 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#48)))*{c'_2#48 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i#93358*{i#93358 <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1#1 j_2#1]*{j_1#1 <- `j_1*`, j_2#1 <- `j_2*`}) = $proj_uN_0(i#93359).0*{i#93359 <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1#2,)))*{j_1#2 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2#2,)))*{j_2#2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#307)*{c#307 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#179*{c_1#179 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#49*{c'_1#49 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#180)))*{c_1#180 <- `c_1*`} + -- let{`c*` : iN*} c#305*{c#305 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#50*{c'_1#50 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#306)))*{c#306 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#310)*{c#310 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#181*{c_1#181 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#51*{c'_1#51 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#182)))*{c_1#182 <- `c_1*`} + -- let{`c*` : iN*} c#308*{c#308 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#52*{c'_1#52 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#309)))*{c#309 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#313)*{c#313 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#183*{c_1#183 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#53*{c'_1#53 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#184)))*{c_1#184 <- `c_1*`} + -- let{`c*` : iN*} c#311*{c#311 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#54*{c'_1#54 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#312)))*{c#312 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#316)*{c#316 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#185*{c_1#185 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#55*{c'_1#55 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#186)))*{c_1#186 <- `c_1*`} + -- let{`c*` : iN*} c#314*{c#314 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#56*{c'_1#56 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#315)))*{c#315 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#319)*{c#319 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#187*{c_1#187 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#57*{c'_1#57 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#188)))*{c_1#188 <- `c_1*`} + -- let{`c*` : iN*} c#317*{c#317 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#58*{c'_1#58 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#318)))*{c#318 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#322)*{c#322 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#189*{c_1#189 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#59*{c'_1#59 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#190)))*{c_1#190 <- `c_1*`} + -- let{`c*` : iN*} c#320*{c#320 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#60*{c'_1#60 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#321)))*{c#321 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#325)*{c#325 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#191*{c_1#191 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#61*{c'_1#61 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#192)))*{c_1#192 <- `c_1*`} + -- let{`c*` : iN*} c#323*{c#323 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#62*{c'_1#62 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#324)))*{c#324 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#328)*{c#328 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#193*{c_1#193 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#63*{c'_1#63 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#194)))*{c_1#194 <- `c_1*`} + -- let{`c*` : iN*} c#326*{c#326 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#64*{c'_1#64 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#327)))*{c#327 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#331)*{c#331 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#195*{c_1#195 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#65*{c'_1#65 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#196)))*{c_1#196 <- `c_1*`} + -- let{`c*` : iN*} c#329*{c#329 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#66*{c'_1#66 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#330)))*{c#330 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#334)*{c#334 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#197*{c_1#197 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#67*{c'_1#67 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#198)))*{c_1#198 <- `c_1*`} + -- let{`c*` : iN*} c#332*{c#332 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#68*{c'_1#68 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#333)))*{c#333 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#337)*{c#337 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#199*{c_1#199 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#69*{c'_1#69 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#200)))*{c_1#200 <- `c_1*`} + -- let{`c*` : iN*} c#335*{c#335 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#70*{c'_1#70 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#336)))*{c#336 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#340)*{c#340 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#201*{c_1#201 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#71*{c'_1#71 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#202)))*{c_1#202 <- `c_1*`} + -- let{`c*` : iN*} c#338*{c#338 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#72*{c'_1#72 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#339)))*{c#339 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#343)*{c#343 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#203*{c_1#203 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#73*{c'_1#73 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#204)))*{c_1#204 <- `c_1*`} + -- let{`c*` : iN*} c#341*{c#341 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#74*{c'_1#74 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#342)))*{c#342 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#346)*{c#346 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#205*{c_1#205 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#75*{c'_1#75 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#206)))*{c_1#206 <- `c_1*`} + -- let{`c*` : iN*} c#344*{c#344 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#76*{c'_1#76 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#345)))*{c#345 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#349)*{c#349 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#207*{c_1#207 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#77*{c'_1#77 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#208)))*{c_1#208 <- `c_1*`} + -- let{`c*` : iN*} c#347*{c#347 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#78*{c'_1#78 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#348)))*{c#348 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#352)*{c#352 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#209*{c_1#209 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#79*{c'_1#79 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#210)))*{c_1#210 <- `c_1*`} + -- let{`c*` : iN*} c#350*{c#350 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#80*{c'_1#80 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#351)))*{c#351 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#1*{i_1#1 <- `i_1*`}, i_2#1*{i_2#1 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#3 j_2#3]*{j_1#3 <- `j_1*`, j_2#3 <- `j_2*`}) = $imul_(N, i_1#2, i_2#2)*{i_1#2 <- `i_1*`, i_2#2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#4))*{j_1#4 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#4))*{j_2#4 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#355)*{c#355 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#211*{c_1#211 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#131*{c_2#131 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#81*{c'_1#81 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#212)))*{c_1#212 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#49*{c'_2#49 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#132)))*{c_2#132 <- `c_2*`} + -- let{`c*` : iN*} c#353*{c#353 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#82*{c'_1#82 <- `c'_1*`}, c'_2#50*{c'_2#50 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#354)))*{c#354 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#358)*{c#358 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#213*{c_1#213 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#133*{c_2#133 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#83*{c'_1#83 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#214)))*{c_1#214 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#51*{c'_2#51 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#134)))*{c_2#134 <- `c_2*`} + -- let{`c*` : iN*} c#356*{c#356 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#84*{c'_1#84 <- `c'_1*`}, c'_2#52*{c'_2#52 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#357)))*{c#357 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#361)*{c#361 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#215*{c_1#215 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#135*{c_2#135 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#85*{c'_1#85 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#216)))*{c_1#216 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#53*{c'_2#53 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#136)))*{c_2#136 <- `c_2*`} + -- let{`c*` : iN*} c#359*{c#359 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#86*{c'_1#86 <- `c'_1*`}, c'_2#54*{c'_2#54 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#360)))*{c#360 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#364)*{c#364 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#217*{c_1#217 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#137*{c_2#137 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#87*{c'_1#87 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#218)))*{c_1#218 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#55*{c'_2#55 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#138)))*{c_2#138 <- `c_2*`} + -- let{`c*` : iN*} c#362*{c#362 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#88*{c'_1#88 <- `c'_1*`}, c'_2#56*{c'_2#56 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#363)))*{c#363 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#367)*{c#367 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#219*{c_1#219 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#139*{c_2#139 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#89*{c'_1#89 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#220)))*{c_1#220 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#57*{c'_2#57 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#140)))*{c_2#140 <- `c_2*`} + -- let{`c*` : iN*} c#365*{c#365 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#90*{c'_1#90 <- `c'_1*`}, c'_2#58*{c'_2#58 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#366)))*{c#366 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#370)*{c#370 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#221*{c_1#221 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#141*{c_2#141 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#91*{c'_1#91 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#222)))*{c_1#222 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#59*{c'_2#59 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#142)))*{c_2#142 <- `c_2*`} + -- let{`c*` : iN*} c#368*{c#368 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#92*{c'_1#92 <- `c'_1*`}, c'_2#60*{c'_2#60 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#369)))*{c#369 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#373)*{c#373 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#223*{c_1#223 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#143*{c_2#143 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#93*{c'_1#93 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#224)))*{c_1#224 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#61*{c'_2#61 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#144)))*{c_2#144 <- `c_2*`} + -- let{`c*` : iN*} c#371*{c#371 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#94*{c'_1#94 <- `c'_1*`}, c'_2#62*{c'_2#62 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#372)))*{c#372 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#376)*{c#376 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#225*{c_1#225 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#145*{c_2#145 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#95*{c'_1#95 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#226)))*{c_1#226 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#63*{c'_2#63 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#146)))*{c_2#146 <- `c_2*`} + -- let{`c*` : iN*} c#374*{c#374 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#96*{c'_1#96 <- `c'_1*`}, c'_2#64*{c'_2#64 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#375)))*{c#375 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#379)*{c#379 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#227*{c_1#227 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#147*{c_2#147 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#97*{c'_1#97 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#228)))*{c_1#228 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#65*{c'_2#65 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#148)))*{c_2#148 <- `c_2*`} + -- let{`c*` : iN*} c#377*{c#377 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#98*{c'_1#98 <- `c'_1*`}, c'_2#66*{c'_2#66 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#378)))*{c#378 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#382)*{c#382 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#229*{c_1#229 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#149*{c_2#149 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#99*{c'_1#99 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#230)))*{c_1#230 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#67*{c'_2#67 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#150)))*{c_2#150 <- `c_2*`} + -- let{`c*` : iN*} c#380*{c#380 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#100*{c'_1#100 <- `c'_1*`}, c'_2#68*{c'_2#68 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#381)))*{c#381 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#385)*{c#385 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#231*{c_1#231 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#151*{c_2#151 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#101*{c'_1#101 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#232)))*{c_1#232 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#69*{c'_2#69 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#152)))*{c_2#152 <- `c_2*`} + -- let{`c*` : iN*} c#383*{c#383 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#102*{c'_1#102 <- `c'_1*`}, c'_2#70*{c'_2#70 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#384)))*{c#384 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#388)*{c#388 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#233*{c_1#233 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#153*{c_2#153 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#103*{c'_1#103 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#234)))*{c_1#234 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#71*{c'_2#71 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#154)))*{c_2#154 <- `c_2*`} + -- let{`c*` : iN*} c#386*{c#386 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#104*{c'_1#104 <- `c'_1*`}, c'_2#72*{c'_2#72 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#387)))*{c#387 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#391)*{c#391 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#235*{c_1#235 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#155*{c_2#155 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#105*{c'_1#105 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#236)))*{c_1#236 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#73*{c'_2#73 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#156)))*{c_2#156 <- `c_2*`} + -- let{`c*` : iN*} c#389*{c#389 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#106*{c'_1#106 <- `c'_1*`}, c'_2#74*{c'_2#74 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#390)))*{c#390 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#394)*{c#394 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#237*{c_1#237 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#157*{c_2#157 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#107*{c'_1#107 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#238)))*{c_1#238 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#75*{c'_2#75 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#158)))*{c_2#158 <- `c_2*`} + -- let{`c*` : iN*} c#392*{c#392 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#108*{c'_1#108 <- `c'_1*`}, c'_2#76*{c'_2#76 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#393)))*{c#393 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#397)*{c#397 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#239*{c_1#239 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#159*{c_2#159 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#109*{c'_1#109 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#240)))*{c_1#240 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#77*{c'_2#77 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#160)))*{c_2#160 <- `c_2*`} + -- let{`c*` : iN*} c#395*{c#395 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#110*{c'_1#110 <- `c'_1*`}, c'_2#78*{c'_2#78 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#396)))*{c#396 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#400)*{c#400 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#241*{c_1#241 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#161*{c_2#161 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#111*{c'_1#111 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#242)))*{c_1#242 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#79*{c'_2#79 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#162)))*{c_2#162 <- `c_2*`} + -- let{`c*` : iN*} c#398*{c#398 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#112*{c'_1#112 <- `c'_1*`}, c'_2#80*{c'_2#80 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#399)))*{c#399 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#3*{i_1#3 <- `i_1*`}, i_2#3*{i_2#3 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#4*{i_1#4 <- `i_1*`}, i_2#4*{i_2#4 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#5 j_2#5]*{j_1#5 <- `j_1*`, j_2#5 <- `j_2*`}) = $imul_(N, i_1#5, i_2#5)*{i_1#5 <- `i_1*`, i_2#5 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#6))*{j_1#6 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#6))*{j_2#6 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#6*{i_1#6 <- `i_1*`}, i_2#6*{i_2#6 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#1*{ci_1#1 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#1*{ci_2#1 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#1*{ci'_1#1 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#2)))*{ci_1#2 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#1*{ci'_2#1 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#2)))*{ci_2#2 <- `ci_2*`} + -- let{`ci*` : iN*} ci#1*{ci#1 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#2*{ci'_1#2 <- `ci'_1*`}, ci'_2#2*{ci'_2#2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#1*{ci'#1 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#2)*{ci#2 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#125)*{iter_0#125 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#2*{ci'#2 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#126)))*{iter_0#126 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#3*{ci'#3 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#3*{ci_1#3 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#3*{ci_2#3 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#3*{ci'_1#3 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#4)))*{ci_1#4 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#3*{ci'_2#3 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#4)))*{ci_2#4 <- `ci_2*`} + -- let{`ci*` : iN*} ci#3*{ci#3 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#4*{ci'_1#4 <- `ci'_1*`}, ci'_2#4*{ci'_2#4 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#4*{ci'#4 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#4)*{ci#4 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#127)*{iter_0#127 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#5*{ci'#5 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#128)))*{iter_0#128 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#6*{ci'#6 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#5*{ci_1#5 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#5*{ci_2#5 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#5*{ci'_1#5 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#6)))*{ci_1#6 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#5*{ci'_2#5 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#6)))*{ci_2#6 <- `ci_2*`} + -- let{`ci*` : iN*} ci#5*{ci#5 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#6*{ci'_1#6 <- `ci'_1*`}, ci'_2#6*{ci'_2#6 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#7*{ci'#7 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#6)*{ci#6 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#129)*{iter_0#129 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#8*{ci'#8 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#130)))*{iter_0#130 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#9*{ci'#9 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#7*{ci_1#7 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#7*{ci_2#7 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#7*{ci'_1#7 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#8)))*{ci_1#8 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#7*{ci'_2#7 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#8)))*{ci_2#8 <- `ci_2*`} + -- let{`ci*` : iN*} ci#7*{ci#7 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#8*{ci'_1#8 <- `ci'_1*`}, ci'_2#8*{ci'_2#8 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#10*{ci'#10 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#8)*{ci#8 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#131)*{iter_0#131 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#11*{ci'#11 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#132)))*{iter_0#132 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#12*{ci'#12 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#9*{ci_1#9 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#9*{ci_2#9 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#9*{ci'_1#9 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#10)))*{ci_1#10 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#9*{ci'_2#9 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#10)))*{ci_2#10 <- `ci_2*`} + -- let{`ci*` : iN*} ci#9*{ci#9 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#10*{ci'_1#10 <- `ci'_1*`}, ci'_2#10*{ci'_2#10 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#13*{ci'#13 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#10)*{ci#10 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#133)*{iter_0#133 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#14*{ci'#14 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#134)))*{iter_0#134 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#15*{ci'#15 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#11*{ci_1#11 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#11*{ci_2#11 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#11*{ci'_1#11 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#12)))*{ci_1#12 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#11*{ci'_2#11 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#12)))*{ci_2#12 <- `ci_2*`} + -- let{`ci*` : iN*} ci#11*{ci#11 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#12*{ci'_1#12 <- `ci'_1*`}, ci'_2#12*{ci'_2#12 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#16*{ci'#16 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#12)*{ci#12 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#135)*{iter_0#135 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#17*{ci'#17 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#136)))*{iter_0#136 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#18*{ci'#18 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#13*{ci_1#13 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#13*{ci_2#13 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#13*{ci'_1#13 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#14)))*{ci_1#14 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#13*{ci'_2#13 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#14)))*{ci_2#14 <- `ci_2*`} + -- let{`ci*` : iN*} ci#13*{ci#13 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#14*{ci'_1#14 <- `ci'_1*`}, ci'_2#14*{ci'_2#14 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#19*{ci'#19 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#14)*{ci#14 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#137)*{iter_0#137 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#20*{ci'#20 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#138)))*{iter_0#138 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#21*{ci'#21 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#15*{ci_1#15 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#15*{ci_2#15 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#15*{ci'_1#15 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#16)))*{ci_1#16 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#15*{ci'_2#15 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#16)))*{ci_2#16 <- `ci_2*`} + -- let{`ci*` : iN*} ci#15*{ci#15 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#16*{ci'_1#16 <- `ci'_1*`}, ci'_2#16*{ci'_2#16 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#22*{ci'#22 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#16)*{ci#16 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#139)*{iter_0#139 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#23*{ci'#23 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#140)))*{iter_0#140 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#24*{ci'#24 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#17*{ci_1#17 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#17*{ci_2#17 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#17*{ci'_1#17 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#18)))*{ci_1#18 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#17*{ci'_2#17 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#18)))*{ci_2#18 <- `ci_2*`} + -- let{`ci*` : iN*} ci#17*{ci#17 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#18*{ci'_1#18 <- `ci'_1*`}, ci'_2#18*{ci'_2#18 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#25*{ci'#25 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#18)*{ci#18 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#141)*{iter_0#141 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#26*{ci'#26 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#142)))*{iter_0#142 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#27*{ci'#27 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#19*{ci_1#19 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#19*{ci_2#19 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#19*{ci'_1#19 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#20)))*{ci_1#20 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#19*{ci'_2#19 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#20)))*{ci_2#20 <- `ci_2*`} + -- let{`ci*` : iN*} ci#19*{ci#19 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#20*{ci'_1#20 <- `ci'_1*`}, ci'_2#20*{ci'_2#20 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#28*{ci'#28 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#20)*{ci#20 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#143)*{iter_0#143 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#29*{ci'#29 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#144)))*{iter_0#144 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#30*{ci'#30 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#21*{ci_1#21 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#21*{ci_2#21 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#21*{ci'_1#21 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#22)))*{ci_1#22 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#21*{ci'_2#21 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#22)))*{ci_2#22 <- `ci_2*`} + -- let{`ci*` : iN*} ci#21*{ci#21 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#22*{ci'_1#22 <- `ci'_1*`}, ci'_2#22*{ci'_2#22 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#31*{ci'#31 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#22)*{ci#22 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#145)*{iter_0#145 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#32*{ci'#32 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#146)))*{iter_0#146 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#33*{ci'#33 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#23*{ci_1#23 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#23*{ci_2#23 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#23*{ci'_1#23 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#24)))*{ci_1#24 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#23*{ci'_2#23 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#24)))*{ci_2#24 <- `ci_2*`} + -- let{`ci*` : iN*} ci#23*{ci#23 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#24*{ci'_1#24 <- `ci'_1*`}, ci'_2#24*{ci'_2#24 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#34*{ci'#34 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#24)*{ci#24 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#147)*{iter_0#147 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#35*{ci'#35 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#148)))*{iter_0#148 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#36*{ci'#36 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#25*{ci_1#25 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#25*{ci_2#25 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#25*{ci'_1#25 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#26)))*{ci_1#26 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#25*{ci'_2#25 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#26)))*{ci_2#26 <- `ci_2*`} + -- let{`ci*` : iN*} ci#25*{ci#25 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#26*{ci'_1#26 <- `ci'_1*`}, ci'_2#26*{ci'_2#26 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#37*{ci'#37 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#26)*{ci#26 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#149)*{iter_0#149 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#38*{ci'#38 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#150)))*{iter_0#150 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#39*{ci'#39 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#27*{ci_1#27 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#27*{ci_2#27 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#27*{ci'_1#27 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#28)))*{ci_1#28 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#27*{ci'_2#27 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#28)))*{ci_2#28 <- `ci_2*`} + -- let{`ci*` : iN*} ci#27*{ci#27 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#28*{ci'_1#28 <- `ci'_1*`}, ci'_2#28*{ci'_2#28 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#40*{ci'#40 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#28)*{ci#28 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#151)*{iter_0#151 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#41*{ci'#41 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#152)))*{iter_0#152 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#42*{ci'#42 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#29*{ci_1#29 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#29*{ci_2#29 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#29*{ci'_1#29 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#30)))*{ci_1#30 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#29*{ci'_2#29 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#30)))*{ci_2#30 <- `ci_2*`} + -- let{`ci*` : iN*} ci#29*{ci#29 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#30*{ci'_1#30 <- `ci'_1*`}, ci'_2#30*{ci'_2#30 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#43*{ci'#43 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#30)*{ci#30 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#153)*{iter_0#153 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#44*{ci'#44 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#154)))*{iter_0#154 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#45*{ci'#45 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#31*{ci_1#31 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#31*{ci_2#31 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#31*{ci'_1#31 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#32)))*{ci_1#32 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#31*{ci'_2#31 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#32)))*{ci_2#32 <- `ci_2*`} + -- let{`ci*` : iN*} ci#31*{ci#31 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#32*{ci'_1#32 <- `ci'_1*`}, ci'_2#32*{ci'_2#32 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#46*{ci'#46 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#32)*{ci#32 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#155)*{iter_0#155 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#47*{ci'#47 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#156)))*{iter_0#156 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#48*{ci'#48 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +def $val_num(num) : val + def $val_num{x0 : numtype, x1 : num_}(CONST_num(x0, x1)) = CONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +def $val_vec(vec) : val + def $val_vec{x0 : vectype, x1 : vec_}(VCONST_vec(x0, x1)) = VCONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +def $funccode_func(func) : funccode + def $funccode_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_funccode(x0, x1, x2) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +def $fieldval_packval(packval) : fieldval + def $fieldval_packval{x0 : packtype, x1 : iN}(PACK_packval(x0, x1)) = PACK_fieldval(x0, x1) + +def $fieldval_ref(ref) : fieldval + def $fieldval_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_fieldval + def $fieldval_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_fieldval(x) + +def $fieldval_val(val) : fieldval + def $fieldval_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_fieldval(x0, x1) + def $fieldval_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_fieldval(x0, x1) + def $fieldval_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_fieldval + def $fieldval_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_fieldval(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(BOT_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{`null?` : null?, heaptype : heaptype, val : val}(REF_storagetype(`null?`, heaptype), val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(V128_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F64_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F32_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I64_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I32_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I8_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i)),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I16_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(BOT_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(V128_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(BOT_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(V128_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(BOT_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(V128_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(BOT_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(V128_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(BOT_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(V128_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(BOT_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(V128_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(BOT_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(V128_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(BOT_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(V128_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(BOT_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(V128_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(BOT_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(V128_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I8_storagetype, ?(sx), PACK_fieldval(I8_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i))),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I16_storagetype, ?(sx), PACK_fieldval(I16_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa#1*{xa#1 <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#2*{xa#2 <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa#3*{xa#3 <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#4*{xa#4 <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa#5*{xa#5 <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#6*{xa#6 <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa#7*{xa#7 <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#8*{xa#8 <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa#9*{xa#9 <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#10*{xa#10 <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b#1*{b#1 <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b#2*{b#2 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r#1*{r#1 <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r#2*{r#2 <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b#3*{b#3 <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b#4*{b#4 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#1?{j#1 <- `j?`}), rt), REFS r'#1*{r'#1 <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#2?{j#2 <- `j?`}), rt), REFS r'#2*{r'#2 <- `r'*`} ++ r^n{}}) + -- if ($proj_uN_0(i').0 = (|r'#3*{r'#3 <- `r'*`}| + n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#3).0))?{j#3 <- `j?`} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size($numtype_addrtype(at))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#4?{j#4 <- `j?`}), rt), REFS r'#4*{r'#4 <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#5?{j#5 <- `j?`}), rt), REFS r'#5*{r'#5 <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#6?{j#6 <- `j?`})), BYTES b#5*{b#5 <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#7?{j#7 <- `j?`})), BYTES b#6*{b#6 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b#7*{b#7 <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#8).0))?{j#8 <- `j?`} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size($numtype_addrtype(at)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#9?{j#9 <- `j?`})), BYTES b#8*{b#8 <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#10?{j#10 <- `j?`})), BYTES b#9*{b#9 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val#1*{val#1 <- `val*`})) = $instr_val(val)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.STRUCTS_store|) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.ARRAYS_store|) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (a < |s.EXNS_store|) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, $val_num(num), $valtype_numtype(nt)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, $val_vec(vec), $valtype_vectype(vt)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, $val_ref(ref), $valtype_reftype(rt)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, $fieldval_val(val), $storagetype_valtype(t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, $fieldval_packval(packval), $storagetype_packtype(pt)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (a < |s.TAGS_store|) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (a < |s.GLOBALS_store|) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (a < |s.MEMS_store|) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (a < |s.TABLES_store|) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype($typeuse_deftype(funcinst.TYPE_funcinst))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(funcinst.TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (iter_val#3 : deftype <: typeuse)*{iter_val#3 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (iter_val#4 : deftype <: typeuse)*{iter_val#4 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (iter_val#5 : deftype <: typeuse)*{iter_val#5 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (iter_val#6 : deftype <: typeuse)*{iter_val#6 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (iter_val#7 : deftype <: typeuse)*{iter_val#7 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([$instr_val(val) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [$instr_val(val_1)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [$instr_val(val_2)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, $instr_val(val)*{val <- `val*`})], $instr_val(val)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, $instr_val(val)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l*{l <- `l*`}|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NULL_instr(l)], [$instr_val(val)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NON_NULL_instr(l)], [$instr_val(val) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, $instr_val(val)^n{val <- `val*`})], $instr_val(val)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, $instr_val(val)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`})], $instr_val(val)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`($instr_val(val)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([$instr_val(val) `LOCAL.TEE`_instr(x)], [$instr_val(val) $instr_val(val) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.AS_NON_NULL`_instr], [$instr_ref(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([$instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], $instr_val(val)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([$instr_ref(ref) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([$instr_ref(ref) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [$instr_ref(ref)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (|$unop_(nt, unop, c_1)| > 0) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (|$binop_(nt, binop, c_1, c_2)| > 0) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (|$cvtop__(nt_1, nt_2, cvtop, c_1)| > 0) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvunop_(V128_vectype, vvunop, c_1)| > 0) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvbinop_(V128_vectype, vvbinop, c_1, c_2)| > 0) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vunop_(sh, vunop, c_1)| > 0) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vbinop_(sh, vbinop, c_1, c_2)| > 0) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c_1)) + -- if ($proj_num__0(c) =/= ?()) + -- (if ($proj_lane__2(i) =/= ?()))*{i <- `i*`} + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(Jnn), !($proj_lane__2(i)))).0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^$proj_dim_0(M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_numtype(nt), M), c_1)|) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape($lanetype_numtype(nt), M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_numtype(nt), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape($lanetype_numtype(nt), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if ($proj_num__0(c_2) =/= ?()) + -- if ($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)|) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape($lanetype_packtype(pt), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1#4*{t_1#4 <- `t_1*`},), `%`_resulttype(t_2#8*{t_2#8 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1#5*{t_1#5 <- `t_1*`},), [], `%`_resulttype(t_2#9*{t_2#9 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#6*{t_1#6 <- `t_1*`},), `%`_resulttype(t_2#10*{t_2#10 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t#5?{t#5 <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t#6?{t#6 <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(ref) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(ref)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(ref)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(ref) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- if (a < |$s(z).FUNCS_store|) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [$instr_val(val)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [$instr_val(val)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [$instr_ref($table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(val) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) $instr_ref($elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr($numtype_addrtype(Inn), mk_num__0_num_(Inn, $extend__(n, $size($numtype_addrtype(Inn)), sx, c)))]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(Inn), mk_num__0_num_(Inn, $extend__(n, $size($numtype_addrtype(Inn)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((K * $proj_dim_0(M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($proj_num__0(i) =/= ?()))^(k<$proj_dim_0(M).0){} + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(M).0){j <- `j*`} + -- if ((c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))^$proj_dim_0(M).0{j <- `j*`})) /\ ($jsizenn(Jnn) = (K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))))^$proj_dim_0(M).0{j <- `j*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), $lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(val) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$data(z, y).BYTES_datainst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]), [$instr_ref(ref)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), $instr_val(val)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`val*`| = |`zt*`|) + -- (if ($default_($unpack(zt)) =/= ?()))*{zt <- `zt*`} + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [$instr_val(!($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])))]) + -- if ($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- if ($proj_uN_0(i).0 < |$s(z).STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |$s(z).STRUCTS_store|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), $instr_val(val)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) =/= ?()) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), $instr_ref(ref)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if ($proj_num__0(i) =/= ?()) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(i) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- (if ($cunpack(zt) =/= ?()))^n{} + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zsize(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [$instr_val(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])))]) + -- if ($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0]) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_num__0(i) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- if (a < |$s(z).ARRAYS_store|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_ref(ref) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if (ref = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- if ($cunpack(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', $instr_val(val)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(val)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if (a < |$s(z).FUNCS_store|) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- (if ($default_(t) =/= ?()))*{t <- `t*`} + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- if ($as_deftype($tag(z, x).TYPE_taginst) =/= ?()) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(val) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(val) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(val) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(val) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if ($growtable($table(z, x), n, ref) =/= ?()) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(c) =/= ?()) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size($numtype_addrtype(Inn)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if ($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]) =/= ?()) + -- if ($proj_uN_0(j).0 < |$lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)|) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if ($growmem($mem(z, x), n) =/= ?()) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`, zt <- `zt*`} + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(val) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(val) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), [])) + -- if ($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`} + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($packfield_(zt, val) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', $instr_val(val)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(val)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'#1*{type'#1 <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'#1*{deftype'#1 <- `deftype'*`} = $alloctypes(type'#2*{type'#2 <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype#1*{deftype#1 <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), $typeuse_deftype(deftype'#2)*{deftype'#2 <- `deftype'*`})) + -- if ($proj_uN_0(x).0 = |deftype'#3*{deftype'#3 <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'#1*{tagtype'#1 <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'#1*{ja'#1 <- `ja'*`}) = $alloctags(s_1, tagtype'#2*{tagtype'#2 <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'#1*{globaltype'#1 <- `globaltype'*`}, [val] ++ val'#1*{val'#1 <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'#1*{ga'#1 <- `ga'*`}) = $allocglobals(s_1, globaltype'#2*{globaltype'#2 <- `globaltype'*`}, val'#2*{val'#2 <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#11?{j#11 <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#12?{j#12 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#13?{j#13 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'#1*{memtype'#1 <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'#1*{ma'#1 <- `ma'*`}) = $allocmems(s_1, memtype'#2*{memtype'#2 <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j#16?{j#16 <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#17?{j#17 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#18?{j#18 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'#1*{tabletype'#1 <- `tabletype'*`}, [ref] ++ ref'#1*{ref'#1 <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'#1*{ta'#1 <- `ta'*`}) = $alloctables(s_1, tabletype'#2*{tabletype'#2 <- `tabletype'*`}, ref'#2*{ref'#2 <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'#5*{dt'#5 <- `dt'*`}, [funccode] ++ funccode'#1*{funccode'#1 <- `funccode'*`}, [moduleinst] ++ moduleinst'#1*{moduleinst'#1 <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'#1*{fa'#1 <- `fa'*`}) = $allocfuncs(s_1, dt'#6*{dt'#6 <- `dt'*`}, funccode'#2*{funccode'#2 <- `funccode'*`}, moduleinst'#2*{moduleinst'#2 <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte#2*{byte#2 <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte#3*{byte#3 <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte#4*{byte#4 <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'#1*{ok'#1 <- `ok'*`}, [b#10*{b#10 <- `b*`}] ++ b'#1*{b'#1 <- `b'*#1`}*{`b'*#1` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b#11*{b#11 <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'#1*{da'#1 <- `da'*`}) = $allocdatas(s_1, ok'#2*{ok'#2 <- `ok'*`}, b'#2*{b'#2 <- `b'*#2`}*{`b'*#2` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref#1*{ref#1 <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref#2*{ref#2 <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref#3*{ref#3 <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'#1*{rt'#1 <- `rt'*`}, [ref#4*{ref#4 <- `ref*`}] ++ ref'#3*{ref'#3 <- `ref'*#1`}*{`ref'*#1` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref#5*{ref#5 <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'#1*{ea'#1 <- `ea'*`}) = $allocelems(s_1, rt'#2*{rt'#2 <- `rt'*`}, ref'#4*{ref'#4 <- `ref'*#2`}*{`ref'*#2` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export#9*{export#9 <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr#1*{externaddr#1 <- `externaddr*`}, val_G#1*{val_G#1 <- `val_G*`}, ref_T#1*{ref_T#1 <- `ref_T*`}, ref_E#1*{ref_E#1 <- `ref_E*#1`}*{`ref_E*#1` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#2*{type#2 <- `type*`},), `%`_list(import#2*{import#2 <- `import*`},), `%`_list(tag#2*{tag#2 <- `tag*`},), `%`_list(global#4*{global#4 <- `global*`},), `%`_list(mem#8*{mem#8 <- `mem*`},), `%`_list(table#8*{table#8 <- `table*`},), `%`_list(func#3*{func#3 <- `func*`},), `%`_list(data#2*{data#2 <- `data*`},), `%`_list(elem#8*{elem#8 <- `elem*`},), start#2?{start#2 <- `start?`}, `%`_list(export#10*{export#10 <- `export*`},)) = module + -- if (tag#3*{tag#3 <- `tag*`} = TAG_tag(tagtype#1)*{tagtype#1 <- `tagtype*`}) + -- if (global#5*{global#5 <- `global*`} = GLOBAL_global(globaltype#122, expr_G#1)*{expr_G#1 <- `expr_G*`, globaltype#122 <- `globaltype*`}) + -- if (mem#9*{mem#9 <- `mem*`} = MEMORY_mem(memtype#1)*{memtype#1 <- `memtype*`}) + -- if (table#9*{table#9 <- `table*`} = TABLE_table(tabletype#156, expr_T#1)*{expr_T#1 <- `expr_T*`, tabletype#156 <- `tabletype*`}) + -- if (func#4*{func#4 <- `func*`} = FUNC_func(x#4, local#3*{local#3 <- `local*#82`}, expr_F#1)*{expr_F#1 <- `expr_F*`, `local*#82` <- `local**`, x#4 <- `x*`}) + -- if (data#3*{data#3 <- `data*`} = DATA_data(byte#5*{byte#5 <- `byte*#110`}, datamode#110)*{`byte*#110` <- `byte**`, datamode#110 <- `datamode*`}) + -- if (elem#9*{elem#9 <- `elem*`} = ELEM_elem(elemtype#1, expr_E#1*{expr_E#1 <- `expr_E*#1`}, elemmode#230)*{elemmode#230 <- `elemmode*`, elemtype#1 <- `elemtype*`, `expr_E*#1` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I#1*{aa_I#1 <- `aa_I*`} = $tagsxa(externaddr#2*{externaddr#2 <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I#1*{ga_I#1 <- `ga_I*`} = $globalsxa(externaddr#3*{externaddr#3 <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I#1*{ma_I#1 <- `ma_I*`} = $memsxa(externaddr#4*{externaddr#4 <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I#1*{ta_I#1 <- `ta_I*`} = $tablesxa(externaddr#5*{externaddr#5 <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I#1*{fa_I#1 <- `fa_I*`} = $funcsxa(externaddr#6*{externaddr#6 <- `externaddr*`}) + -- let{`dt*` : deftype*} dt#8*{dt#8 <- `dt*`} = $alloctypes(type#3*{type#3 <- `type*`}) + -- let{`fa*` : nat*} fa#1*{fa#1 <- `fa*`} = (|s.FUNCS_store| + i_F#1)^(i_F#1<|func#5*{func#5 <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa#1*{aa#1 <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype#2, $typeuse_deftype(dt#9)*{dt#9 <- `dt*`})*{tagtype#2 <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga#1*{ga#1 <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype#124, $typeuse_deftype(dt#10)*{dt#10 <- `dt*`})*{globaltype#124 <- `globaltype*`}, val_G#2*{val_G#2 <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma#1*{ma#1 <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype#2, $typeuse_deftype(dt#11)*{dt#11 <- `dt*`})*{memtype#2 <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta#1*{ta#1 <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype#158, $typeuse_deftype(dt#12)*{dt#12 <- `dt*`})*{tabletype#158 <- `tabletype*`}, ref_T#2*{ref_T#2 <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da#1*{da#1 <- `da*`}) = $allocdatas(s_4, OK_datatype^|data#4*{data#4 <- `data*`}|{}, byte#6*{byte#6 <- `byte*#112`}*{`byte*#112` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea#1*{ea#1 <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype#2, $typeuse_deftype(dt#13)*{dt#13 <- `dt*`})*{elemtype#2 <- `elemtype*`}, ref_E#2*{ref_E#2 <- `ref_E*#2`}*{`ref_E*#2` <- `ref_E**`}) + -- if ((s_7, fa#2*{fa#2 <- `fa*`}) = $allocfuncs(s_6, dt#14*{dt#14 <- `dt*`}[$proj_uN_0(x#5).0]*{x#5 <- `x*`}, FUNC_funccode(x#6, local#4*{local#4 <- `local*#84`}, expr_F#2)*{expr_F#2 <- `expr_F*`, `local*#84` <- `local**`, x#6 <- `x*`}, moduleinst^|func#6*{func#6 <- `func*`}|{})) + -- if (xi#1*{xi#1 <- `xi*`} = $allocexports({TYPES [], TAGS aa_I#2*{aa_I#2 <- `aa_I*`} ++ aa#2*{aa#2 <- `aa*`}, GLOBALS ga_I#2*{ga_I#2 <- `ga_I*`} ++ ga#2*{ga#2 <- `ga*`}, MEMS ma_I#2*{ma_I#2 <- `ma_I*`} ++ ma#2*{ma#2 <- `ma*`}, TABLES ta_I#2*{ta_I#2 <- `ta_I*`} ++ ta#2*{ta#2 <- `ta*`}, FUNCS fa_I#2*{fa_I#2 <- `fa_I*`} ++ fa#3*{fa#3 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export#11*{export#11 <- `export*`})) + -- if (moduleinst = {TYPES dt#15*{dt#15 <- `dt*`}, TAGS aa_I#3*{aa_I#3 <- `aa_I*`} ++ aa#3*{aa#3 <- `aa*`}, GLOBALS ga_I#3*{ga_I#3 <- `ga_I*`} ++ ga#3*{ga#3 <- `ga*`}, MEMS ma_I#3*{ma_I#3 <- `ma_I*`} ++ ma#3*{ma#3 <- `ma*`}, TABLES ta_I#3*{ta_I#3 <- `ta_I*`} ++ ta#3*{ta#3 <- `ta*`}, FUNCS fa_I#3*{fa_I#3 <- `fa_I*`} ++ fa#4*{fa#4 <- `fa*`}, DATAS da#2*{da#2 <- `da*`}, ELEMS ea#2*{ea#2 <- `ea*`}, EXPORTS xi#2*{xi#2 <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type#4*{type#4 <- `type*`},), `%`_list(import#3*{import#3 <- `import*`},), `%`_list(tag#4*{tag#4 <- `tag*`},), `%`_list(global#6*{global#6 <- `global*`},), `%`_list(mem#10*{mem#10 <- `mem*`},), `%`_list(table#10*{table#10 <- `table*`},), `%`_list(func#7*{func#7 <- `func*`},), `%`_list(data#5*{data#5 <- `data*`},), `%`_list(elem#10*{elem#10 <- `elem*`},), start#3?{start#3 <- `start?`}, `%`_list(export#12*{export#12 <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype#3),))*{tagtype#3 <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype#125, expr_G#2),))*{expr_G#2 <- `expr_G*`, globaltype#125 <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype#3),))*{memtype#3 <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype#159, expr_T#2),))*{expr_T#2 <- `expr_T*`, tabletype#159 <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x#7, local#5*{local#5 <- `local*#86`}, expr_F#3),))*{expr_F#3 <- `expr_F*`, `local*#86` <- `local**`, x#7 <- `x*`} + -- (wf_data: `%`(DATA_data(byte#7*{byte#7 <- `byte*#113`}, datamode#112),))*{`byte*#113` <- `byte**`, datamode#112 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype#3, expr_E#2*{expr_E#2 <- `expr_E*#2`}, elemmode#232),))*{elemmode#232 <- `elemmode*`, elemtype#3 <- `elemtype*`, `expr_E*#2` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I#4*{aa_I#4 <- `aa_I*`} ++ aa#4*{aa#4 <- `aa*`}, GLOBALS ga_I#4*{ga_I#4 <- `ga_I*`} ++ ga#4*{ga#4 <- `ga*`}, MEMS ma_I#4*{ma_I#4 <- `ma_I*`} ++ ma#4*{ma#4 <- `ma*`}, TABLES ta_I#4*{ta_I#4 <- `ta_I*`} ++ ta#4*{ta#4 <- `ta*`}, FUNCS fa_I#4*{fa_I#4 <- `fa_I*`} ++ fa#5*{fa#5 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt#16*{dt#16 <- `dt*`}, TAGS aa_I#5*{aa_I#5 <- `aa_I*`} ++ aa#5*{aa#5 <- `aa*`}, GLOBALS ga_I#5*{ga_I#5 <- `ga_I*`} ++ ga#5*{ga#5 <- `ga*`}, MEMS ma_I#5*{ma_I#5 <- `ma_I*`} ++ ma#5*{ma#5 <- `ma*`}, TABLES ta_I#5*{ta_I#5 <- `ta_I*`} ++ ta#5*{ta#5 <- `ta*`}, FUNCS fa_I#5*{fa_I#5 <- `fa_I*`} ++ fa#6*{fa#6 <- `fa*`}, DATAS da#3*{da#3 <- `da*`}, ELEMS ea#3*{ea#3 <- `ea*`}, EXPORTS xi#3*{xi#3 <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b#12^n{b#12 <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b#13^n{b#13 <- `b*`}, ACTIVE_datamode(y, instr#8*{instr#8 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#1^n{e#1 <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#3^n{e#3 <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e#5^n{e#5 <- `e*`}, ACTIVE_elemmode(y, instr#10*{instr#10 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'#1*{expr'#1 <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [$val_ref(ref)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'#5*{ref'#5 <- `ref'*`}) = $evalexprs(z', expr'#2*{expr'#2 <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr#373*{expr#373 <- `expr*`}] ++ expr'#3*{expr'#3 <- `expr'*#1`}*{`expr'*#1` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref#6*{ref#6 <- `ref*`}) = $evalexprs(z, expr#374*{expr#374 <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'#6*{ref'#6 <- `ref'*#3`}*{`ref'*#3` <- `ref'**`}) = $evalexprss(z', expr'#4*{expr'#4 <- `expr'*#2`}*{`expr'*#2` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'#1*{gt'#1 <- `gt'*`}, [expr] ++ expr'#5*{expr'#5 <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'#3*{val'#3 <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'#2*{gt'#2 <- `gt'*`}, expr'#6*{expr'#6 <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr#7*{externaddr#7 <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I#1*{xt_I#1 <- `xt_I*`}, xt_E#1*{xt_E#1 <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr#8, xt_I#2))*{externaddr#8 <- `externaddr*`, xt_I#2 <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#5*{type#5 <- `type*`},), `%`_list(import#4*{import#4 <- `import*`},), `%`_list(tag#5*{tag#5 <- `tag*`},), `%`_list(global#7*{global#7 <- `global*`},), `%`_list(mem#11*{mem#11 <- `mem*`},), `%`_list(table#11*{table#11 <- `table*`},), `%`_list(func#8*{func#8 <- `func*`},), `%`_list(data#6*{data#6 <- `data*`},), `%`_list(elem#11*{elem#11 <- `elem*`},), start#4?{start#4 <- `start?`}, `%`_list(export#13*{export#13 <- `export*`},)) = module + -- if (global#8*{global#8 <- `global*`} = GLOBAL_global(globaltype#127, expr_G#3)*{expr_G#3 <- `expr_G*`, globaltype#127 <- `globaltype*`}) + -- if (table#12*{table#12 <- `table*`} = TABLE_table(tabletype#161, expr_T#3)*{expr_T#3 <- `expr_T*`, tabletype#161 <- `tabletype*`}) + -- if (data#7*{data#7 <- `data*`} = DATA_data(byte#8*{byte#8 <- `byte*#117`}, datamode#116)*{`byte*#117` <- `byte**`, datamode#116 <- `datamode*`}) + -- if (elem#12*{elem#12 <- `elem*`} = ELEM_elem(reftype#521, expr_E#3*{expr_E#3 <- `expr_E*#3`}, elemmode#237)*{elemmode#237 <- `elemmode*`, `expr_E*#3` <- `expr_E**`, reftype#521 <- `reftype*`}) + -- if (start#5?{start#5 <- `start?`} = START_start(x#8)?{x#8 <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type#6*{type#6 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#9*{externaddr#9 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#10*{externaddr#10 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#2)^(i_F#2<|func#9*{func#9 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G#3*{val_G#3 <- `val_G*`}) = $evalglobals(z, globaltype#129*{globaltype#129 <- `globaltype*`}, expr_G#4*{expr_G#4 <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T#3*{ref_T#3 <- `ref_T*`}) = $evalexprs(z', expr_T#4*{expr_T#4 <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E#3*{ref_E#3 <- `ref_E*#3`}*{`ref_E*#3` <- `ref_E**`}) = $evalexprss(z'', expr_E#4*{expr_E#4 <- `expr_E*#4`}*{`expr_E*#4` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr#11*{externaddr#11 <- `externaddr*`}, val_G#4*{val_G#4 <- `val_G*`}, ref_T#4*{ref_T#4 <- `ref_T*`}, ref_E#4*{ref_E#4 <- `ref_E*#4`}*{`ref_E*#4` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D#1*{instr_D#1 <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D#1,), data#9*{data#9 <- `data*`}[i_D#1])^(i_D#1<|data#8*{data#8 <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E#1*{instr_E#1 <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E#1,), elem#14*{elem#14 <- `elem*`}[i_E#1])^(i_E#1<|elem#13*{elem#13 <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S#1?{instr_S#1 <- `instr_S?`} = CALL_instr(x#9)?{x#9 <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E#2*{instr_E#2 <- `instr_E*`} ++ instr_D#2*{instr_D#2 <- `instr_D*`} ++ lift(instr_S#2?{instr_S#2 <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I#3*{xt_I#3 <- `xt_I*`}, xt_E#2*{xt_E#2 <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type#7*{type#7 <- `type*`},), `%`_list(import#5*{import#5 <- `import*`},), `%`_list(tag#6*{tag#6 <- `tag*`},), `%`_list(global#9*{global#9 <- `global*`},), `%`_list(mem#12*{mem#12 <- `mem*`},), `%`_list(table#13*{table#13 <- `table*`},), `%`_list(func#10*{func#10 <- `func*`},), `%`_list(data#10*{data#10 <- `data*`},), `%`_list(elem#15*{elem#15 <- `elem*`},), start#6?{start#6 <- `start?`}, `%`_list(export#14*{export#14 <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype#130, expr_G#5),))*{expr_G#5 <- `expr_G*`, globaltype#130 <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype#163, expr_T#5),))*{expr_T#5 <- `expr_T*`, tabletype#163 <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte#9*{byte#9 <- `byte*#119`}, datamode#118),))*{`byte*#119` <- `byte**`, datamode#118 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype#523, expr_E#5*{expr_E#5 <- `expr_E*#5`}, elemmode#239),))*{elemmode#239 <- `elemmode*`, `expr_E*#5` <- `expr_E**`, reftype#523 <- `reftype*`} + -- (wf_start: `%`(START_start(x#10),))?{x#10 <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type#8*{type#8 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#12*{externaddr#12 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#13*{externaddr#13 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#3)^(i_F#3<|func#11*{func#11 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D#2,)))^(i_D#2<|data#11*{data#11 <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E#2,)))^(i_E#2<|elem#16*{elem#16 <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x#11),))?{x#11 <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val#2*{val#2 <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(val)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr($typeuse_deftype(s.FUNCS_store[funcaddr].TYPE_funcinst))]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1#7*{t_1#7 <- `t_1*`},), `%`_resulttype(t_2#11*{t_2#11 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val#3, t_1#8))*{t_1#8 <- `t_1*`, val#3 <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(val#4)*{val#4 <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr($typeuse_deftype(s.FUNCS_store[funcaddr].TYPE_funcinst))]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#9*{t_1#9 <- `t_1*`},), `%`_resulttype(t_2#12*{t_2#12 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'#1*{I'#1 <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +def $decl_data(data) : decl + def $decl_data{x0 : byte*, x1 : datamode}(DATA_data(x0, x1)) = DATA_decl(x0, x1) + +def $decl_elem(elem) : decl + def $decl_elem{x0 : reftype, x1 : expr*, x2 : elemmode}(ELEM_elem(x0, x1, x2)) = ELEM_decl(x0, x1, x2) + +def $decl_export(export) : decl + def $decl_export{x0 : name, x1 : externidx}(EXPORT_export(x0, x1)) = EXPORT_decl(x0, x1) + +def $decl_func(func) : decl + def $decl_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_decl(x0, x1, x2) + +def $decl_global(global) : decl + def $decl_global{x0 : globaltype, x1 : expr}(GLOBAL_global(x0, x1)) = GLOBAL_decl(x0, x1) + +def $decl_import(import) : decl + def $decl_import{x0 : name, x1 : name, x2 : externtype}(IMPORT_import(x0, x1, x2)) = IMPORT_decl(x0, x1, x2) + +def $decl_mem(mem) : decl + def $decl_mem{x : memtype}(MEMORY_mem(x)) = MEMORY_decl(x) + +def $decl_start(start) : decl + def $decl_start{x : funcidx}(START_start(x)) = START_decl(x) + +def $decl_table(table) : decl + def $decl_table{x0 : tabletype, x1 : expr}(TABLE_table(x0, x1)) = TABLE_decl(x0, x1) + +def $decl_tag(tag) : decl + def $decl_tag{x : tagtype}(TAG_tag(x)) = TAG_decl(x) + +def $decl_type(type) : decl + def $decl_type{x : rectype}(TYPE_type(x)) = TYPE_decl(x) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{var_0 : rectype, `decl'*` : decl*}([TYPE_decl(var_0)] ++ decl'#1*{decl'#1 <- `decl'*`}) = [TYPE_type(var_0)] ++ $typesd(decl'#2*{decl'#2 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#3*{decl'#3 <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{name : name, name_0 : name, externtype : externtype, `decl'*` : decl*}([IMPORT_decl(name, name_0, externtype)] ++ decl'#4*{decl'#4 <- `decl'*`}) = [IMPORT_import(name, name_0, externtype)] ++ $importsd(decl'#5*{decl'#5 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#6*{decl'#6 <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{var_0 : tagtype, `decl'*` : decl*}([TAG_decl(var_0)] ++ decl'#7*{decl'#7 <- `decl'*`}) = [TAG_tag(var_0)] ++ $tagsd(decl'#8*{decl'#8 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#9*{decl'#9 <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{globaltype : globaltype, expr : expr, `decl'*` : decl*}([GLOBAL_decl(globaltype, expr)] ++ decl'#10*{decl'#10 <- `decl'*`}) = [GLOBAL_global(globaltype, expr)] ++ $globalsd(decl'#11*{decl'#11 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#12*{decl'#12 <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{var_0 : memtype, `decl'*` : decl*}([MEMORY_decl(var_0)] ++ decl'#13*{decl'#13 <- `decl'*`}) = [MEMORY_mem(var_0)] ++ $memsd(decl'#14*{decl'#14 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#15*{decl'#15 <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{tabletype : tabletype, expr : expr, `decl'*` : decl*}([TABLE_decl(tabletype, expr)] ++ decl'#16*{decl'#16 <- `decl'*`}) = [TABLE_table(tabletype, expr)] ++ $tablesd(decl'#17*{decl'#17 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#18*{decl'#18 <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{typeidx : typeidx, `local*` : local*, expr : expr, `decl'*` : decl*}([FUNC_decl(typeidx, `local*`, expr)] ++ decl'#19*{decl'#19 <- `decl'*`}) = [FUNC_func(typeidx, `local*`, expr)] ++ $funcsd(decl'#20*{decl'#20 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#21*{decl'#21 <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{`byte*` : byte*, datamode : datamode, `decl'*` : decl*}([DATA_decl(`byte*`, datamode)] ++ decl'#22*{decl'#22 <- `decl'*`}) = [DATA_data(`byte*`, datamode)] ++ $datasd(decl'#23*{decl'#23 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#24*{decl'#24 <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{reftype : reftype, `expr*` : expr*, elemmode : elemmode, `decl'*` : decl*}([ELEM_decl(reftype, `expr*`, elemmode)] ++ decl'#25*{decl'#25 <- `decl'*`}) = [ELEM_elem(reftype, `expr*`, elemmode)] ++ $elemsd(decl'#26*{decl'#26 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#27*{decl'#27 <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{var_0 : funcidx, `decl'*` : decl*}([START_decl(var_0)] ++ decl'#28*{decl'#28 <- `decl'*`}) = [START_start(var_0)] ++ $startsd(decl'#29*{decl'#29 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#30*{decl'#30 <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{name : name, externidx : externidx, `decl'*` : decl*}([EXPORT_decl(name, externidx)] ++ decl'#31*{decl'#31 <- `decl'*`}) = [EXPORT_export(name, externidx)] ++ $exportsd(decl'#32*{decl'#32 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#33*{decl'#33 <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl#1*{decl#1 <- `decl*`}) = true + -- if ($importsd(decl#2*{decl#2 <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{name : name, name_0 : name, externtype : externtype, `decl_1*` : decl*, `decl_2*` : decl*}(decl_1#1*{decl_1#1 <- `decl_1*`} ++ [IMPORT_decl(name, name_0, externtype)] ++ decl_2#1*{decl_2#1 <- `decl_2*`}) = (((((($importsd(decl_1#7*{decl_1#7 <- `decl_1*`}) = []) /\ ($tagsd(decl_1#6*{decl_1#6 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1#5*{decl_1#5 <- `decl_1*`}) = [])) /\ ($memsd(decl_1#4*{decl_1#4 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1#3*{decl_1#3 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1#2*{decl_1#2 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if ($proj_uN_0(x).0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i 0) + -- (if (exportinst.ADDR_exportinst <- TAG_externaddr(tagaddr)*{tagaddr <- `tagaddr*`} ++ GLOBAL_externaddr(globaladdr)*{globaladdr <- `globaladdr*`} ++ MEM_externaddr(memaddr)*{memaddr <- `memaddr*`} ++ TABLE_externaddr(tableaddr)*{tableaddr <- `tableaddr*`} ++ FUNC_externaddr(funcaddr)*{funcaddr <- `funcaddr*`}))*{exportinst <- `exportinst*`} + -- if (k <= |funcaddr*{funcaddr <- `funcaddr*`}|) + -- wf_store: `%`(s,) + -- wf_moduleinst: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}},) + -- wf_context: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, $instr_ref(ref), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE $funccode_func(func)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE $funccode_func(func)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`zt*`|) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if (ta < |s.TAGS_store|) + -- if ($typeuse_deftype(dt) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if (|`t*`| = |`val*`|) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- if (i < |s.STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |s.STRUCTS_store|) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (i < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- if (i < |s.ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |s.ARRAYS_store|) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, $fieldval_val(s.EXNS_store[a].FIELDS_exninst[i])) + -- if (i < |s.EXNS_store[a].FIELDS_exninst|) + -- if (a < |s.EXNS_store|) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, $fieldval_ref(ref)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- if (|`taginst*`| = |`tagtype*`|) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- if (|`globalinst*`| = |`globaltype*`|) + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- if (|`meminst*`| = |`memtype*`|) + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- if (|`tableinst*`| = |`tabletype*`|) + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- if (|`deftype*`| = |`funcinst*`|) + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- if (|`datainst*`| = |`datatype*`|) + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- if (|`eleminst*`| = |`elemtype*`|) + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`fv'*`|) + -- if (|`fv*`| = |`mut?*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (|`fv*`| = |`fv'*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (if (a < |s.TAGS_store|))^(a<|s.TAGS_store|){} + -- (if (a < |s'.TAGS_store|))^(a<|s.TAGS_store|){} + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (if (a < |s.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (if (a < |s'.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (if (a < |s.MEMS_store|))^(a<|s.MEMS_store|){} + -- (if (a < |s'.MEMS_store|))^(a<|s.MEMS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (if (a < |s.TABLES_store|))^(a<|s.TABLES_store|){} + -- (if (a < |s'.TABLES_store|))^(a<|s.TABLES_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (if (a < |s.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (if (a < |s'.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (if (a < |s.DATAS_store|))^(a<|s.DATAS_store|){} + -- (if (a < |s'.DATAS_store|))^(a<|s.DATAS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (if (a < |s.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (if (a < |s'.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (if (a < |s.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (if (a < |s'.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (if (a < |s.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (if (a < |s'.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (if (a < |s.EXNS_store|))^(a<|s.EXNS_store|){} + -- (if (a < |s'.EXNS_store|))^(a<|s.EXNS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'#1*{X'#1 <- `X'*`}, [Y] ++ Y'#1*{Y'#1 <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'#1*{a'#1 <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'#2*{X'#2 <- `X'*`}, Y'#2*{Y'#2 <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8($proj_name_0(name).0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => ($decl_type(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => ($decl_import(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => ($decl_tag(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => ($decl_global(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => ($decl_mem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => ($decl_table(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => ($decl_func(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => ($decl_data(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => ($decl_elem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => ($decl_start(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => ($decl_export(``.0), ``.1) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/12-alias-demut.il b/spectec/test-middlend/specification.exp/12-alias-demut.il new file mode 100644 index 0000000000..31f17ff69a --- /dev/null +++ b/spectec/test-middlend/specification.exp/12-alias-demut.il @@ -0,0 +1,20177 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{n : nat, `n'*` : n*}([n] ++ n'#1*{n'#1 <- `n'*`}) = (n + $sum(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{n : nat, `n'*` : n*}([n] ++ n'#2*{n'#2 <- `n'*`}) = (n * $prod(n'*{n' <- `n'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, `w*` : X*, `w'**` : X**}(syntax X, [w#72*{w#72 <- `w*`}] ++ w'#85*{w'#85 <- `w'*#2`}*{`w'*#2` <- `w'**`}) = w*{w <- `w*`} ++ $concat_(syntax X, w'*{w' <- `w'*`}*{`w'*` <- `w'**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, n : nat}(syntax X, [], n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, n : nat, `w*` : X*, `w'**` : X**}(syntax X, [w#73^n{w#73 <- `w*`}] ++ w'#86^n{w'#86 <- `w'*#3`}*{`w'*#3` <- `w'**`}, n) = w^n{w <- `w*`} ++ $concatn_(syntax X, w'^n{w' <- `w'*`}*{`w'*` <- `w'**`}, n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, `w?` : X?, `w'?*` : X?*}(syntax X, [w#74?{w#74 <- `w?`}] ++ w'#87?{w'#87 <- `w'?#71`}*{`w'?#71` <- `w'?*`}) = lift(w?{w <- `w?`}) ++ $concat_(syntax X, lift(w'?{w' <- `w'?`})*{`w'?` <- `w'?*`}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, `w'*` : X*}(syntax X, [w] ++ w'#88*{w'#88 <- `w'*`}) = (~ (w <- w'*{w' <- `w'*`}) /\ $disjoint_(syntax X, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X : X, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, `w'*` : X*}(syntax X, w, [w_1] ++ w'#89*{w'#89 <- `w'*`}) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'*{w' <- `w'*`})) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, X*, X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, `w*` : X*}(syntax X, [], w#75*{w#75 <- `w*`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, `w'*` : X*, `w*` : X*}(syntax X, [w_1] ++ w'#90*{w'#90 <- `w'*`}, w#76*{w#76 <- `w*`}) = $setminus1_(syntax X, w_1, w*{w <- `w*`}) ++ $setminus_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X : X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, w_1, [w'#91*{w'#91 <- `w'*`}] ++ w#77*{w#77 <- `w*#1`}*{`w*#1` <- `w**`}) = [[w_1] ++ w'*{w' <- `w'*`}] ++ $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, X*, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, `w**` : X**}(syntax X, [], w#78*{w#78 <- `w*#2`}*{`w*#2` <- `w**`}) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, `w'*` : X*, `w**` : X**}(syntax X, [w_1] ++ w'#92*{w'#92 <- `w'*`}, w#79*{w#79 <- `w*#3`}*{`w*#3` <- `w**`}) = $setproduct2_(syntax X, w_1, w*{w <- `w*`}*{`w*` <- `w**`}) ++ $setproduct1_(syntax X, w'*{w' <- `w'*`}, w*{w <- `w*`}*{`w*` <- `w**`}) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, `w_1*` : X*, `w**` : X**}(syntax X, [w_1#1*{w_1#1 <- `w_1*`}] ++ w#80*{w#80 <- `w*#4`}*{`w*#4` <- `w**`}) = $setproduct1_(syntax X, w_1*{w_1 <- `w_1*`}, $setproduct_(syntax X, w*{w <- `w*`}*{`w*` <- `w**`})) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{N : N, i : nat}: + `%%`(N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{N : N, i : int}: + `%%`(N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $M(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $M{N : nat}(N) = !($signif(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{N : nat}(N) = !($expon(N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(m : m, exp : exp) + | SUBNORM(m : m,) + | INF + | NAN(m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{N : N, m : m, exp : exp}: + `%%`(N, NORM_fNmag(m, exp)) + -- if ((m < (2 ^ $M(N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= exp) /\ (exp <= (((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{N : N, exp : exp, m : m}: + `%%`(N, SUBNORM_fNmag(m,)) + -- if ((m < (2 ^ $M(N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{N : N}: + `%%`(N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{N : N, m : m}: + `%%`(N, NAN_fNmag(m,)) + -- if ((1 <= m) /\ (m < (2 ^ $M(N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{N : N, var_0 : fNmag}: + `%%`(N, POS_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{N : N, var_0 : fNmag}: + `%%`(N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{N : nat}(N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{N : nat, n : nat}(N, n) = POS_fN(NORM_fNmag(n, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{N : nat}(N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{N : nat}(N) = (2 ^ (((!($signif(N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(`X*` : X*,) + -- if (|X*{X <- `X*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{`ch*` : char*}(ch#1*{ch#1 <- `ch*`}) = $concat_(syntax byte, $utf8single(ch)*{ch <- `ch*`}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(`char*` : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{`char*` : char*}: + `%`(`%`_name(`char*`,),) + -- (wf_char: `%`(char,))*{char <- `char*`} + -- if (|$utf8(char*{char <- `char*`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, `xx*` : externidx*}([FUNC_externidx(x)] ++ xx#1*{xx#1 <- `xx*`}) = [x] ++ $funcsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#2*{xx#2 <- `xx*`}) = $funcsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, `xx*` : externidx*}([GLOBAL_externidx(x)] ++ xx#3*{xx#3 <- `xx*`}) = [x] ++ $globalsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#4*{xx#4 <- `xx*`}) = $globalsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, `xx*` : externidx*}([TABLE_externidx(x)] ++ xx#5*{xx#5 <- `xx*`}) = [x] ++ $tablesxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#6*{xx#6 <- `xx*`}) = $tablesxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, `xx*` : externidx*}([MEM_externidx(x)] ++ xx#7*{xx#7 <- `xx*`}) = [x] ++ $memsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#8*{xx#8 <- `xx*`}) = $memsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, `xx*` : externidx*}([TAG_externidx(x)] ++ xx#9*{xx#9 <- `xx*`}) = [x] ++ $tagsxx(xx*{xx <- `xx*`}) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{externidx : externidx, `xx*` : externidx*}([externidx] ++ xx#10*{xx#10 <- `xx*`}) = $tagsxx(xx*{xx <- `xx*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{free : free}(?(free)) = free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{free : free, `free'*` : free*}([free] ++ free'#1*{free'#1 <- `free'*`}) = free +++ $free_list(free'*{free' <- `free'*`}) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{typeidx : uN}(typeidx) = {TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{funcidx : uN}(funcidx) = {TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{globalidx : uN}(globalidx) = {TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{tableidx : uN}(tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{memidx : uN}(memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{elemidx : uN}(elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{dataidx : uN}(dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{localidx : uN}(localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{labelidx : uN}(labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{tagidx : uN}(tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{funcidx : uN}(FUNC_externidx(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{globalidx : uN}(GLOBAL_externidx(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tableidx : uN}(TABLE_externidx(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{memidx : uN}(MEM_externidx(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{tagidx : uN}(TAG_externidx(tagidx)) = $free_tagidx(tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +def $numtype_addrtype(addrtype) : numtype + def $numtype_addrtype(I32_addrtype) = I32_numtype + def $numtype_addrtype(I64_addrtype) = I64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +def $consttype_numtype(numtype) : consttype + def $consttype_numtype(I32_numtype) = I32_consttype + def $consttype_numtype(I64_numtype) = I64_consttype + def $consttype_numtype(F32_numtype) = F32_consttype + def $consttype_numtype(F64_numtype) = F64_consttype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(rectype : rectype, n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(`null?` : null?, heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(`mut?` : mut?, storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(resulttype : list(syntax valtype), resulttype : list(syntax valtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(`final?` : final?, `typeuse*` : typeuse*, comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax resulttype = list(syntax valtype) + +def $heaptype_absheaptype(absheaptype) : heaptype + def $heaptype_absheaptype(ANY_absheaptype) = ANY_heaptype + def $heaptype_absheaptype(EQ_absheaptype) = EQ_heaptype + def $heaptype_absheaptype(I31_absheaptype) = I31_heaptype + def $heaptype_absheaptype(STRUCT_absheaptype) = STRUCT_heaptype + def $heaptype_absheaptype(ARRAY_absheaptype) = ARRAY_heaptype + def $heaptype_absheaptype(NONE_absheaptype) = NONE_heaptype + def $heaptype_absheaptype(FUNC_absheaptype) = FUNC_heaptype + def $heaptype_absheaptype(NOFUNC_absheaptype) = NOFUNC_heaptype + def $heaptype_absheaptype(EXN_absheaptype) = EXN_heaptype + def $heaptype_absheaptype(NOEXN_absheaptype) = NOEXN_heaptype + def $heaptype_absheaptype(EXTERN_absheaptype) = EXTERN_heaptype + def $heaptype_absheaptype(NOEXTERN_absheaptype) = NOEXTERN_heaptype + def $heaptype_absheaptype(BOT_absheaptype) = BOT_heaptype + +def $valtype_addrtype(addrtype) : valtype + def $valtype_addrtype(I32_addrtype) = I32_valtype + def $valtype_addrtype(I64_addrtype) = I64_valtype + +def $storagetype_consttype(consttype) : storagetype + def $storagetype_consttype(I32_consttype) = I32_storagetype + def $storagetype_consttype(I64_consttype) = I64_storagetype + def $storagetype_consttype(F32_consttype) = F32_storagetype + def $storagetype_consttype(F64_consttype) = F64_storagetype + def $storagetype_consttype(V128_consttype) = V128_storagetype + +def $storagetype_numtype(numtype) : storagetype + def $storagetype_numtype(I32_numtype) = I32_storagetype + def $storagetype_numtype(I64_numtype) = I64_storagetype + def $storagetype_numtype(F32_numtype) = F32_storagetype + def $storagetype_numtype(F64_numtype) = F64_storagetype + +def $valtype_numtype(numtype) : valtype + def $valtype_numtype(I32_numtype) = I32_valtype + def $valtype_numtype(I64_numtype) = I64_valtype + def $valtype_numtype(F32_numtype) = F32_valtype + def $valtype_numtype(F64_numtype) = F64_valtype + +def $heaptype_typeuse(typeuse) : heaptype + def $heaptype_typeuse{x : typeidx}(_IDX_typeuse(x)) = _IDX_heaptype(x) + def $heaptype_typeuse{x0 : rectype, x1 : n}(_DEF_typeuse(x0, x1)) = _DEF_heaptype(x0, x1) + def $heaptype_typeuse{x : n}(REC_typeuse(x)) = REC_heaptype(x) + +def $storagetype_valtype(valtype) : storagetype + def $storagetype_valtype(I32_valtype) = I32_storagetype + def $storagetype_valtype(I64_valtype) = I64_storagetype + def $storagetype_valtype(F32_valtype) = F32_storagetype + def $storagetype_valtype(F64_valtype) = F64_storagetype + def $storagetype_valtype(V128_valtype) = V128_storagetype + def $storagetype_valtype{x0 : null?, x1 : heaptype}(REF_valtype(x0, x1)) = REF_storagetype(x0, x1) + def $storagetype_valtype(BOT_valtype) = BOT_storagetype + +def $storagetype_vectype(vectype) : storagetype + def $storagetype_vectype(V128_vectype) = V128_storagetype + +def $valtype_vectype(vectype) : valtype + def $valtype_vectype(V128_vectype) = V128_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{rectype : rectype, n : n}: + `%`(_DEF_typeuse(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{rectype : rectype, n : n}: + `%`(_DEF_heaptype(rectype, n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_valtype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{`null?` : null?, heaptype : heaptype}: + `%`(REF_storagetype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{`mut?` : mut?, storagetype : storagetype}: + `%`(`%%`_fieldtype(`mut?`, storagetype),) + -- wf_storagetype: `%`(storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}: + `%`(SUB_subtype(`final?`, `typeuse*`, comptype),) + -- (wf_typeuse: `%`(typeuse,))*{typeuse <- `typeuse*`} + -- wf_comptype: `%`(comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(rectype : rectype, n : n) + +def $heaptype_deftype(deftype) : heaptype + def $heaptype_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_heaptype(x0, x1) + +def $typeuse_deftype(deftype) : typeuse + def $typeuse_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_typeuse(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +def $typeuse_typevar(typevar) : typeuse + def $typeuse_typevar{x : typeidx}(_IDX_typevar(x)) = _IDX_typeuse(x) + def $typeuse_typevar{x : n}(REC_typevar(x)) = REC_typeuse(x) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(`null?` : null?, heaptype : heaptype) + +def $storagetype_reftype(reftype) : storagetype + def $storagetype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_storagetype(x0, x1) + +def $valtype_reftype(reftype) : valtype + def $valtype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_valtype(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{`null?` : null?, heaptype : heaptype}: + `%`(REF_reftype(`null?`, heaptype),) + -- wf_heaptype: `%`(heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +def $numtype_Fnn(Fnn) : numtype + def $numtype_Fnn(F32_Fnn) = F32_numtype + def $numtype_Fnn(F64_Fnn) = F64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +def $storagetype_packtype(packtype) : storagetype + def $storagetype_packtype(I8_packtype) = I8_storagetype + def $storagetype_packtype(I16_packtype) = I16_storagetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +def $lanetype_Fnn(Fnn) : lanetype + def $lanetype_Fnn(F32_Fnn) = F32_lanetype + def $lanetype_Fnn(F64_Fnn) = F64_lanetype + +def $lanetype_addrtype(addrtype) : lanetype + def $lanetype_addrtype(I32_addrtype) = I32_lanetype + def $lanetype_addrtype(I64_addrtype) = I64_lanetype + +def $lanetype_numtype(numtype) : lanetype + def $lanetype_numtype(I32_numtype) = I32_lanetype + def $lanetype_numtype(I64_numtype) = I64_lanetype + def $lanetype_numtype(F32_numtype) = F32_lanetype + def $lanetype_numtype(F64_numtype) = F64_lanetype + +def $lanetype_packtype(packtype) : lanetype + def $lanetype_packtype(I8_packtype) = I8_lanetype + def $lanetype_packtype(I16_packtype) = I16_lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +def $lanetype_Jnn(Jnn) : lanetype + def $lanetype_Jnn(I32_Jnn) = I32_lanetype + def $lanetype_Jnn(I64_Jnn) = I64_lanetype + def $lanetype_Jnn(I8_Jnn) = I8_lanetype + def $lanetype_Jnn(I16_Jnn) = I16_lanetype + +def $Jnn_addrtype(addrtype) : Jnn + def $Jnn_addrtype(I32_addrtype) = I32_Jnn + def $Jnn_addrtype(I64_addrtype) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(u64 : u64, `u64?` : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{u64 : u64, `u64?` : u64?}: + `%`(`[%..%]`_limits(u64, `u64?`),) + -- wf_uN: `%%`(64, u64) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(`mut?` : mut?, valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{`mut?` : mut?, valtype : valtype}: + `%`(`%%`_globaltype(`mut?`, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(addrtype : addrtype, limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{addrtype : addrtype, limits : limits}: + `%`(`%%PAGE`_memtype(addrtype, limits),) + -- wf_limits: `%`(limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(addrtype : addrtype, limits : limits, reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{addrtype : addrtype, limits : limits, reftype : reftype}: + `%`(`%%%`_tabletype(addrtype, limits, reftype),) + -- wf_limits: `%`(limits,) + -- wf_reftype: `%`(reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(`externtype*` : externtype*, `externtype*` : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{`externtype*` : externtype*, `externtype*_0` : externtype*}: + `%`(`%->%`_moduletype(`externtype*`, `externtype*_0`),) + -- (wf_externtype: `%`(externtype,))*{externtype <- `externtype*`} + -- (wf_externtype: `%`(`externtype*_0`,))*{`externtype*_0` <- `externtype*_0`} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I32_lanetype) = $size(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I64_lanetype) = $size(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F32_lanetype) = $size(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F64_lanetype) = $size(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I8_lanetype) = $psize(I8_packtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I16_lanetype) = $psize(I16_packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I32_storagetype) = ?($size(I32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I64_storagetype) = ?($size(I64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F32_storagetype) = ?($size(F32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F64_storagetype) = ?($size(F64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(V128_storagetype) = ?($vsize(V128_vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I8_storagetype) = ?($psize(I8_packtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I16_storagetype) = ?($psize(I16_packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{Inn : addrtype}(Inn) = $size($numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{Jnn : Jnn}(Jnn) = $lsize($lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{Fnn : Fnn}(Fnn) = $size($numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{n : nat}(n) = $Jnn_addrtype(iter_val#1)?{iter_val#1 <- $inv_isize(n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{Jnn : Jnn}(Jnn) = $lsize($lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{n : nat}(n) = $inv_jsize(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I32_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I64_lanetype) = I64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F32_lanetype) = F32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F64_lanetype) = F64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I8_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I16_lanetype) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(BOT_storagetype) = BOT_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = REF_valtype(`null?`, heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(V128_storagetype) = V128_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F64_storagetype) = F64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F32_storagetype) = F32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I64_storagetype) = I64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I32_storagetype) = I32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I8_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I16_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I32_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I64_storagetype) = ?(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F32_storagetype) = ?(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F64_storagetype) = ?(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I8_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I16_storagetype) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack(V128_storagetype) = ?(V128_vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?(I64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?(F32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?(F64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(V128_storagetype) = ?(V128_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?($consttype_numtype($lunpack(I32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?($consttype_numtype($lunpack(I64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?($consttype_numtype($lunpack(F32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?($consttype_numtype($lunpack(F64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?($consttype_numtype($lunpack(I8_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?($consttype_numtype($lunpack(I16_lanetype))) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(addrtype : addrtype, addrtype : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size($numtype_addrtype(at_1)) <= $size($numtype_addrtype(at_2))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(reftype : reftype, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#1?{null_1#1 <- `null_1?`}, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{`null_1?` : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1#2?{null_1#2 <- `null_1?`}, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1#3?{null_1#3 <- `null_1?`}, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{rectype : rectype, n : n}(_DEF_typeuse(rectype, n)) = ?(_DEF_deftype(rectype, n)) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt#1*{xt#1 <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#2*{xt#2 <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt#3*{xt#3 <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#4*{xt#4 <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt#5*{xt#5 <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#6*{xt#6 <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt#7*{xt#7 <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#8*{xt#8 <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{rectype : rectype, n : n, `xt*` : externtype*}([FUNC_externtype(_DEF_typeuse(rectype, n))] ++ xt#9*{xt#9 <- `xt*`}) = [_DEF_deftype(rectype, n)] ++ $funcsxt(xt#10*{xt#10 <- `xt*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt#11*{xt#11 <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?($typeuse_typevar(tv)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'#1*{tv'#1 <- `tv'*`}, [tu_1] ++ tu'#1*{tu'#1 <- `tu'*`}) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{n : nat, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv#1*{tv#1 <- `tv*`}, [tu_1] ++ tu#1*{tu#1 <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([_IDX_typevar(x)] ++ tv#2*{tv#2 <- `tv*`}, [tu_1] ++ tu#2*{tu#2 <- `tu*`}) = ?(([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`})) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#2*{tv'#2 <- `tv'*`}, tu'#2*{tu'#2 <- `tu'*`}) = !($minus_recs(tv#3*{tv#3 <- `tv*`}, tu#3*{tu#3 <- `tu*`})) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(packtype : packtype, typevar*, typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}(pt, tv#4*{tv#4 <- `tv*`}, tu#4*{tu#4 <- `tu*`}) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(numtype : numtype, typevar*, typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}(nt, tv#5*{tv#5 <- `tv*`}, tu#5*{tu#5 <- `tu*`}) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}(vt, tv#6*{tv#6 <- `tv*`}, tu#6*{tu#6 <- `tu*`}) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_typeuse(var_1), tv#7*{tv#7 <- `tv*`}, tu#7*{tu#7 <- `tu*`}) = !($subst_typevar(REC_typevar(var_1), tv#8*{tv#8 <- `tv*`}, tu#8*{tu#8 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_typeuse(var_0), tv#9*{tv#9 <- `tv*`}, tu#9*{tu#9 <- `tu*`}) = !($subst_typevar(_IDX_typevar(var_0), tv#10*{tv#10 <- `tv*`}, tu#10*{tu#10 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_typeuse(rectype, n), tv#11*{tv#11 <- `tv*`}, tu#11*{tu#11 <- `tu*`}) = $typeuse_deftype($subst_deftype(_DEF_deftype(rectype, n), tv#12*{tv#12 <- `tv*`}, tu#12*{tu#12 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_1 : n, `tv*` : typevar*, `tu*` : typeuse*}(REC_heaptype(var_1), tv#13*{tv#13 <- `tv*`}, tu#13*{tu#13 <- `tu*`}) = $heaptype_typeuse(!($subst_typevar(REC_typevar(var_1), tv#14*{tv#14 <- `tv*`}, tu#14*{tu#14 <- `tu*`}))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_0 : typeidx, `tv*` : typevar*, `tu*` : typeuse*}(_IDX_heaptype(var_0), tv#15*{tv#15 <- `tv*`}, tu#15*{tu#15 <- `tu*`}) = $heaptype_typeuse(!($subst_typevar(_IDX_typevar(var_0), tv#16*{tv#16 <- `tv*`}, tu#16*{tu#16 <- `tu*`}))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{rectype : rectype, n : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_heaptype(rectype, n), tv#17*{tv#17 <- `tv*`}, tu#17*{tu#17 <- `tu*`}) = $heaptype_deftype($subst_deftype(_DEF_deftype(rectype, n), tv#18*{tv#18 <- `tv*`}, tu#18*{tu#18 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv#19*{tv#19 <- `tv*`}, tu#19*{tu#19 <- `tu*`}) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null#1?{null#1 <- `null?`}, ht), tv#20*{tv#20 <- `tv*`}, tu#20*{tu#20 <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_reftype: `%`(REF_reftype(null#2?{null#2 <- `null?`}, $subst_heaptype(ht, tv#21*{tv#21 <- `tv*`}, tu#21*{tu#21 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I32_valtype, tv#22*{tv#22 <- `tv*`}, tu#22*{tu#22 <- `tu*`}) = $valtype_numtype($subst_numtype(I32_numtype, tv#23*{tv#23 <- `tv*`}, tu#23*{tu#23 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(I64_valtype, tv#24*{tv#24 <- `tv*`}, tu#24*{tu#24 <- `tu*`}) = $valtype_numtype($subst_numtype(I64_numtype, tv#25*{tv#25 <- `tv*`}, tu#25*{tu#25 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F32_valtype, tv#26*{tv#26 <- `tv*`}, tu#26*{tu#26 <- `tu*`}) = $valtype_numtype($subst_numtype(F32_numtype, tv#27*{tv#27 <- `tv*`}, tu#27*{tu#27 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(F64_valtype, tv#28*{tv#28 <- `tv*`}, tu#28*{tu#28 <- `tu*`}) = $valtype_numtype($subst_numtype(F64_numtype, tv#29*{tv#29 <- `tv*`}, tu#29*{tu#29 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(V128_valtype, tv#30*{tv#30 <- `tv*`}, tu#30*{tu#30 <- `tu*`}) = $valtype_vectype($subst_vectype(V128_vectype, tv#31*{tv#31 <- `tv*`}, tu#31*{tu#31 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_valtype(`null?`, heaptype), tv#32*{tv#32 <- `tv*`}, tu#32*{tu#32 <- `tu*`}) = $valtype_reftype($subst_reftype(REF_reftype(`null?`, heaptype), tv#33*{tv#33 <- `tv*`}, tu#33*{tu#33 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv#34*{tv#34 <- `tv*`}, tu#34*{tu#34 <- `tu*`}) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_storagetype, tv#35*{tv#35 <- `tv*`}, tu#35*{tu#35 <- `tu*`}) = $storagetype_valtype($subst_valtype(BOT_valtype, tv#36*{tv#36 <- `tv*`}, tu#36*{tu#36 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`null?` : null?, heaptype : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_storagetype(`null?`, heaptype), tv#37*{tv#37 <- `tv*`}, tu#37*{tu#37 <- `tu*`}) = $storagetype_valtype($subst_valtype(REF_valtype(`null?`, heaptype), tv#38*{tv#38 <- `tv*`}, tu#38*{tu#38 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(V128_storagetype, tv#39*{tv#39 <- `tv*`}, tu#39*{tu#39 <- `tu*`}) = $storagetype_valtype($subst_valtype(V128_valtype, tv#40*{tv#40 <- `tv*`}, tu#40*{tu#40 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F64_storagetype, tv#41*{tv#41 <- `tv*`}, tu#41*{tu#41 <- `tu*`}) = $storagetype_valtype($subst_valtype(F64_valtype, tv#42*{tv#42 <- `tv*`}, tu#42*{tu#42 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(F32_storagetype, tv#43*{tv#43 <- `tv*`}, tu#43*{tu#43 <- `tu*`}) = $storagetype_valtype($subst_valtype(F32_valtype, tv#44*{tv#44 <- `tv*`}, tu#44*{tu#44 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I64_storagetype, tv#45*{tv#45 <- `tv*`}, tu#45*{tu#45 <- `tu*`}) = $storagetype_valtype($subst_valtype(I64_valtype, tv#46*{tv#46 <- `tv*`}, tu#46*{tu#46 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I32_storagetype, tv#47*{tv#47 <- `tv*`}, tu#47*{tu#47 <- `tu*`}) = $storagetype_valtype($subst_valtype(I32_valtype, tv#48*{tv#48 <- `tv*`}, tu#48*{tu#48 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I8_storagetype, tv#49*{tv#49 <- `tv*`}, tu#49*{tu#49 <- `tu*`}) = $storagetype_packtype($subst_packtype(I8_packtype, tv#50*{tv#50 <- `tv*`}, tu#50*{tu#50 <- `tu*`})) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{`tv*` : typevar*, `tu*` : typeuse*}(I16_storagetype, tv#51*{tv#51 <- `tv*`}, tu#51*{tu#51 <- `tu*`}) = $storagetype_packtype($subst_packtype(I16_packtype, tv#52*{tv#52 <- `tv*`}, tu#52*{tu#52 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut#1?{mut#1 <- `mut?`}, zt), tv#53*{tv#53 <- `tv*`}, tu#53*{tu#53 <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut#2?{mut#2 <- `mut?`}, $subst_storagetype(zt, tv#54*{tv#54 <- `tv*`}, tu#54*{tu#54 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft#1*{ft#1 <- `ft*`},)), tv#55*{tv#55 <- `tv*`}, tu#55*{tu#55 <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft#2, tv#56*{tv#56 <- `tv*`}, tu#56*{tu#56 <- `tu*`})*{ft#2 <- `ft*`},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv#57*{tv#57 <- `tv*`}, tu#57*{tu#57 <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv#58*{tv#58 <- `tv*`}, tu#58*{tu#58 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1#2*{t_1#2 <- `t_1*`},), `%`_resulttype(t_2#6*{t_2#6 <- `t_2*`},)), tv#59*{tv#59 <- `tv*`}, tu#59*{tu#59 <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1#3, tv#60*{tv#60 <- `tv*`}, tu#60*{tu#60 <- `tu*`})*{t_1#3 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2#7, tv#61*{tv#61 <- `tv*`}, tu#61*{tu#61 <- `tu*`})*{t_2#7 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final#1?{final#1 <- `final?`}, tu'#3*{tu'#3 <- `tu'*`}, ct), tv#62*{tv#62 <- `tv*`}, tu#62*{tu#62 <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_subtype: `%`(SUB_subtype(final#2?{final#2 <- `final?`}, $subst_typeuse(tu'#4, tv#63*{tv#63 <- `tv*`}, tu#63*{tu#63 <- `tu*`})*{tu'#4 <- `tu'*`}, $subst_comptype(ct, tv#64*{tv#64 <- `tv*`}, tu#64*{tu#64 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*}(REC_rectype(`%`_list(st#1*{st#1 <- `st*`},)), tv#65*{tv#65 <- `tv*`}, tu#65*{tu#65 <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) + -- let{`tv'*` : typevar*, `tu'*` : typeuse*} (tv'#3*{tv'#3 <- `tv'*`}, tu'#6*{tu'#6 <- `tu'*`}) = !($minus_recs(tv#66*{tv#66 <- `tv*`}, tu#66*{tu#66 <- `tu*`})) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv#67*{tv#67 <- `tv*`}, tu#67*{tu#67 <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(addrtype : addrtype, typevar*, typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, `tv*` : typevar*, `tu*` : typeuse*}(at, tv#68*{tv#68 <- `tv*`}, tu#68*{tu#68 <- `tu*`}) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(tagtype : tagtype, typevar*, typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(tu', tv#69*{tv#69 <- `tv*`}, tu#69*{tu#69 <- `tu*`}) = $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(globaltype : globaltype, typevar*, typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{`mut?` : mut?, t : valtype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_globaltype(mut#3?{mut#3 <- `mut?`}, t), tv#70*{tv#70 <- `tv*`}, tu#70*{tu#70 <- `tu*`}) = `%%`_globaltype(mut?{mut <- `mut?`}, $subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_globaltype: `%`(`%%`_globaltype(mut#4?{mut#4 <- `mut?`}, $subst_valtype(t, tv#71*{tv#71 <- `tv*`}, tu#71*{tu#71 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(memtype : memtype, typevar*, typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, `tv*` : typevar*, `tu*` : typeuse*}(`%%PAGE`_memtype(at, lim), tv#72*{tv#72 <- `tv*`}, tu#72*{tu#72 <- `tu*`}) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(tabletype : tabletype, typevar*, typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_tabletype(at, lim, rt), tv#73*{tv#73 <- `tv*`}, tu#73*{tu#73 <- `tu*`}) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv#74*{tv#74 <- `tv*`}, tu#74*{tu#74 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(TAG_externtype(jt), tv#75*{tv#75 <- `tv*`}, tu#75*{tu#75 <- `tu*`}) = TAG_externtype($subst_tagtype(jt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv#76*{tv#76 <- `tv*`}, tu#76*{tu#76 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, `tv*` : typevar*, `tu*` : typeuse*}(GLOBAL_externtype(gt), tv#77*{tv#77 <- `tv*`}, tu#77*{tu#77 <- `tu*`}) = GLOBAL_externtype($subst_globaltype(gt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv#78*{tv#78 <- `tv*`}, tu#78*{tu#78 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, `tv*` : typevar*, `tu*` : typeuse*}(TABLE_externtype(tt), tv#79*{tv#79 <- `tv*`}, tu#79*{tu#79 <- `tu*`}) = TABLE_externtype($subst_tabletype(tt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv#80*{tv#80 <- `tv*`}, tu#80*{tu#80 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv#81*{tv#81 <- `tv*`}, tu#81*{tu#81 <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv#82*{tv#82 <- `tv*`}, tu#82*{tu#82 <- `tu*`})),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(tu'), tv#83*{tv#83 <- `tv*`}, tu#83*{tu#83 <- `tu*`}) = FUNC_externtype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv#84*{tv#84 <- `tv*`}, tu#84*{tu#84 <- `tu*`})),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{`xt_1*` : externtype*, `xt_2*` : externtype*, `tv*` : typevar*, `tu*` : typeuse*}(`%->%`_moduletype(xt_1#1*{xt_1#1 <- `xt_1*`}, xt_2#1*{xt_2#1 <- `xt_2*`}), tv#85*{tv#85 <- `tv*`}, tu#85*{tu#85 <- `tu*`}) = `%->%`_moduletype($subst_externtype(xt_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_1 <- `xt_1*`}, $subst_externtype(xt_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{xt_2 <- `xt_2*`}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1#2, tv#86*{tv#86 <- `tv*`}, tu#86*{tu#86 <- `tu*`})*{xt_1#2 <- `xt_1*`}, $subst_externtype(xt_2#2, tv#87*{tv#87 <- `tv*`}, tu#87*{tu#87 <- `tu*`})*{xt_2#2 <- `xt_2*`}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(valtype : valtype, typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, n : nat, `tu*` : typeuse*, i : nat}(t, tu#88^n{tu#88 <- `tu*`}) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, comptype : comptype}(SUB_subtype(final#3?{final#3 <- `final?`}, typeuse#4*{typeuse#4 <- `typeuse*`}, comptype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_comptype(comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype#36*{subtype#36 <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{rectype : rectype, n : nat}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{typeuse : typeuse}(typeuse) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{`mut?` : mut?, valtype : valtype}(`%%`_globaltype(mut#6?{mut#6 <- `mut?`}, valtype)) = $free_valtype(valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{addrtype : addrtype, limits : limits}(`%%PAGE`_memtype(addrtype, limits)) = $free_addrtype(addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{addrtype : addrtype, limits : limits, reftype : reftype}(`%%%`_tabletype(addrtype, limits, reftype)) = $free_addrtype(addrtype) +++ $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{reftype : reftype}(reftype) = $free_reftype(reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tagtype : typeuse}(TAG_externtype(tagtype)) = $free_tagtype(tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{globaltype : globaltype}(GLOBAL_externtype(globaltype)) = $free_globaltype(globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{memtype : memtype}(MEM_externtype(memtype)) = $free_memtype(memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{`externtype_1*` : externtype*, `externtype_2*` : externtype*}(`%->%`_moduletype(externtype_1#1*{externtype_1#1 <- `externtype_1*`}, externtype_2#1*{externtype_2#1 <- `externtype_2*`})) = $free_list($free_externtype(externtype_1)*{externtype_1 <- `externtype_1*`}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- `externtype_2*`}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(Inn : Inn, var_x : iN) + | mk_num__1(Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{numtype : numtype, Inn : Inn, var_x : iN}: + `%%`(numtype, mk_num__0_num_(Inn, var_x)) + -- wf_uN: `%%`($size($numtype_addrtype(Inn)), var_x) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{numtype : numtype, Fnn : Fnn, var_x : fN}: + `%%`(numtype, mk_num__1_num_(Fnn, var_x)) + -- wf_fN: `%%`($sizenn($numtype_Fnn(Fnn)), var_x) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{Inn : Inn, var_x : iN}(mk_num__0_num_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{Fnn : Fnn, var_x : fN}(mk_num__1_num_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(numtype : numtype, var_x : num_) + | mk_lane__1(packtype : packtype, var_x : pack_) + | mk_lane__2(Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{lanetype : lanetype, numtype : numtype, var_x : num_}: + `%%`(lanetype, mk_lane__0_lane_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (lanetype = $lanetype_numtype(numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{lanetype : lanetype, packtype : packtype, var_x : pack_}: + `%%`(lanetype, mk_lane__1_lane_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (lanetype = $lanetype_packtype(packtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{lanetype : lanetype, Jnn : Jnn, var_x : iN}: + `%%`(lanetype, mk_lane__2_lane_(Jnn, var_x)) + -- wf_uN: `%%`($lsize($lanetype_Jnn(Jnn)), var_x) + -- if (lanetype = $lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{numtype : numtype, var_x : num_}(mk_lane__0_lane_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{packtype : packtype, var_x : pack_}(mk_lane__1_lane_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(numtype : numtype, var_x : num_) + | mk_lit__1(vectype : vectype, var_x : vec_) + | mk_lit__2(packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{storagetype : storagetype, numtype : numtype, var_x : num_}: + `%%`(storagetype, mk_lit__0_lit_(numtype, var_x)) + -- wf_num_: `%%`(numtype, var_x) + -- if (storagetype = $storagetype_numtype(numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{storagetype : storagetype, vectype : vectype, var_x : vec_}: + `%%`(storagetype, mk_lit__1_lit_(vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (storagetype = $storagetype_vectype(vectype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{storagetype : storagetype, packtype : packtype, var_x : pack_}: + `%%`(storagetype, mk_lit__2_lit_(packtype, var_x)) + -- wf_uN: `%%`($psize(packtype), var_x) + -- if (storagetype = $storagetype_packtype(packtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{numtype : numtype, var_x : num_}(mk_lit__0_lit_(numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{vectype : vectype, var_x : vec_}(mk_lit__1_lit_(vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{packtype : packtype, var_x : pack_}(mk_lit__2_lit_(packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{Inn : Inn}: + `%%`(Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{Inn : Inn}: + `%%`(Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{Inn : Inn}: + `%%`(Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{Inn : Inn, sz : sz}: + `%%`(Inn, EXTEND_unop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(Inn : Inn, var_x : unop_Inn) + | mk_unop__1(Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{numtype : numtype, Inn : Inn, var_x : unop_Inn}: + `%%`(numtype, mk_unop__0_unop_(Inn, var_x)) + -- wf_unop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{numtype : numtype, Fnn : Fnn, var_x : unop_Fnn}: + `%%`(numtype, mk_unop__1_unop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(Inn : Inn, var_x : binop_Inn) + | mk_binop__1(Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{numtype : numtype, Inn : Inn, var_x : binop_Inn}: + `%%`(numtype, mk_binop__0_binop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{numtype : numtype, Fnn : Fnn, var_x : binop_Fnn}: + `%%`(numtype, mk_binop__1_binop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{numtype : numtype, Inn : Inn, var_x : testop_Inn}: + `%%`(numtype, mk_testop__0_testop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(Inn : Inn, var_x : relop_Inn) + | mk_relop__1(Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{numtype : numtype, Inn : Inn, var_x : relop_Inn}: + `%%`(numtype, mk_relop__0_relop_(Inn, var_x)) + -- if (numtype = $numtype_addrtype(Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{numtype : numtype, Fnn : Fnn, var_x : relop_Fnn}: + `%%`(numtype, mk_relop__1_relop_(Fnn, var_x)) + -- if (numtype = $numtype_Fnn(Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1($numtype_addrtype(Inn_1)) < $sizenn2($numtype_addrtype(Inn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) > $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) < $sizenn2($numtype_Fnn(Fnn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) > $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(lanetype : lanetype, dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{lanetype : lanetype, dim : dim}: + `%`(`%X%`_shape(lanetype, dim),) + -- wf_dim: `%`(dim,) + -- if (($lsize(lanetype) * $proj_dim_0(dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $dim(shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $dim{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $lanetype(shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $lanetype{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{Lnn : lanetype, M : dim}(`%X%`_shape(Lnn, M)) = $lunpack(Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{Jnn : Jnn, shape : shape}: + `%`(`%`_ishape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = $lanetype_Jnn(Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{shape : shape}: + `%`(`%`_bshape(shape,),) + -- wf_shape: `%`(shape,) + -- if ($lanetype(shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(Jnn : Jnn, M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(Fnn : Fnn, M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vunop_Jnn_M}: + `%%`(shape, mk_vunop__0_vunop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vunop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vunop_Fnn_M}: + `%%`(shape, mk_vunop__1_vunop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{Jnn : Jnn, M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{Fnn : Fnn, M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, MUL_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{Jnn : Jnn, M : M, var_0 : sx}: + `%%%`(Jnn, M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(Jnn)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(Jnn : Jnn, M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(Fnn : Fnn, M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}: + `%%`(shape, mk_vbinop__0_vbinop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vbinop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}: + `%%`(shape, mk_vbinop__1_vbinop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{Jnn : Jnn, M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{Fnn : Fnn, M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(Jnn : Jnn, M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(Fnn : Fnn, M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vternop_Jnn_M}: + `%%`(shape, mk_vternop__0_vternop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vternop_Fnn_M}: + `%%`(shape, mk_vternop__1_vternop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{Jnn : Jnn, M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{Fnn : Fnn, M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(Jnn : Jnn, M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}: + `%%`(shape, mk_vtestop__0_vtestop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{Jnn : Jnn, M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(sx : sx,) + | GT(sx : sx,) + | LE(sx : sx,) + | GE(sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{Jnn : Jnn, M : M}: + `%%%`(Jnn, M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GT_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, LE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{Jnn : Jnn, M : M, sx : sx}: + `%%%`(Jnn, M, GE_vrelop_Jnn_M(sx,)) + -- if (($lsizenn($lanetype_Jnn(Jnn)) =/= 64) \/ (sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(Jnn : Jnn, M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(Fnn : Fnn, M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{shape : shape, Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}: + `%%`(shape, mk_vrelop__0_vrelop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- wf_vrelop_Jnn_M: `%%%`(Jnn, M, var_x) + -- if (shape = `%X%`_shape($lanetype_Jnn(Jnn), M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{shape : shape, Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}: + `%%`(shape, mk_vrelop__1_vrelop_(Fnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (shape = `%X%`_shape($lanetype_Fnn(Fnn), M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{Jnn : Jnn, M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(Jnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{Fnn : Fnn, M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(Fnn, M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{ishape : ishape, Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}: + `%%`(ishape, mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) + -- wf_dim: `%`(M,) + -- if (ishape = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn), M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{Jnn : Jnn, M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(Jnn, M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{bshape : bshape, M : M, var_x : vswizzlop_M}: + `%%`(bshape, mk_vswizzlop__0_vswizzlop_(M, var_x)) + -- wf_dim: `%`(M,) + -- if (bshape = `%`_bshape(`%X%`_shape(I8_lanetype, M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(half : half, sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(half : half, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, half : half, sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)) + -- if ($lsizenn2($lanetype_Jnn(Jnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(`half?` : half?, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, `half?` : half?, sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(`half?`, sx)) + -- if (((($sizenn2($numtype_Fnn(Fnn_2)) = $lsizenn1($lanetype_Jnn(Jnn_1))) /\ ($lsizenn1($lanetype_Jnn(Jnn_1)) = 32)) /\ (half?{half <- `half?`} = ?())) \/ (($sizenn2($numtype_Fnn(Fnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (half?{half <- `half?`} = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(sx : sx, `zero?` : zero?) + | RELAXED_TRUNC(sx : sx, `zero?` : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, sx : sx, `zero?` : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, `zero?`)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $sizenn2($numtype_Fnn(Fnn_2)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1($numtype_Fnn(Fnn_1))) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(sz : sz, sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{Inn : Inn, sz : sz, sx : sx}: + `%%`(Inn, `%_%`_loadop_Inn(sz, sx)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{numtype : numtype, Inn : Inn, var_x : loadop_Inn}: + `%%`(numtype, mk_loadop__0_loadop_(Inn, var_x)) + -- wf_loadop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{Inn : Inn, sz : sz}: + `%%`(Inn, `%`_storeop_Inn(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 < $sizenn($numtype_addrtype(Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{numtype : numtype, Inn : Inn, var_x : storeop_Inn}: + `%%`(numtype, mk_storeop__0_storeop_(Inn, var_x)) + -- wf_storeop_Inn: `%%`(Inn, var_x) + -- if (numtype = $numtype_addrtype(Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(sz : sz, M : M, sx : sx) + | SPLAT(sz) + | ZERO(sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{vectype : vectype, sz : sz, M : M, sx : sx}: + `%%`(vectype, `SHAPE%X%_%`_vloadop_(sz, M, sx)) + -- wf_sz: `%`(sz,) + -- wf_dim: `%`(M,) + -- if ((($proj_sz_0(sz).0 * $proj_dim_0(M).0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{vectype : vectype, var_0 : sz}: + `%%`(vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{vectype : vectype, sz : sz}: + `%%`(vectype, ZERO_vloadop_(sz,)) + -- wf_sz: `%`(sz,) + -- if ($proj_sz_0(sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(tagidx : tagidx, labelidx : labelidx) + | CATCH_REF(tagidx : tagidx, labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{tagidx : tagidx, labelidx : labelidx}: + `%`(CATCH_REF_catch(tagidx, labelidx),) + -- wf_uN: `%%`(32, tagidx) + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +def $val_ref(ref) : val + def $val_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_val(x) + def $val_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_val + def $val_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_val(x) + def $val_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_val(x) + def $val_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_val(x) + def $val_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_val(x) + def $val_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_val(x) + def $val_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_val(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_val(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(blocktype : blocktype, `instr*` : instr*) + | LOOP(blocktype : blocktype, `instr*` : instr*) + | `IF%%ELSE%`(blocktype : blocktype, `instr*` : instr*, `instr*` : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(`labelidx*` : labelidx*, labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(blocktype : blocktype, list(syntax catch), `instr*` : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(tableidx : tableidx, tableidx : tableidx) + | `TABLE.INIT`(tableidx : tableidx, elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(numtype : numtype, loadop_?, memidx : memidx, memarg : memarg) + | STORE(numtype : numtype, storeop_?, memidx : memidx, memarg : memarg) + | VLOAD(vectype : vectype, vloadop_?, memidx : memidx, memarg : memarg) + | VLOAD_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | VSTORE(vectype : vectype, memidx : memidx, memarg : memarg) + | VSTORE_LANE(vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(memidx : memidx, memidx : memidx) + | `MEMORY.INIT`(memidx : memidx, dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx) + | `STRUCT.SET`(typeidx : typeidx, fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(typeidx : typeidx, u32 : u32) + | `ARRAY.NEW_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.NEW_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `ARRAY.GET`(`sx?` : sx?, typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(typeidx : typeidx, typeidx : typeidx) + | `ARRAY.INIT_DATA`(typeidx : typeidx, dataidx : dataidx) + | `ARRAY.INIT_ELEM`(typeidx : typeidx, elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(numtype : numtype, num_) + | UNOP(numtype : numtype, unop_) + | BINOP(numtype : numtype, binop_) + | TESTOP(numtype : numtype, testop_) + | RELOP(numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(vectype : vectype, vec_) + | VVUNOP(vectype : vectype, vvunop : vvunop) + | VVBINOP(vectype : vectype, vvbinop : vvbinop) + | VVTERNOP(vectype : vectype, vvternop : vvternop) + | VVTESTOP(vectype : vectype, vvtestop : vvtestop) + | VUNOP(shape : shape, vunop_) + | VBINOP(shape : shape, vbinop_) + | VTERNOP(shape : shape, vternop_) + | VTESTOP(shape : shape, vtestop_) + | VRELOP(shape : shape, vrelop_) + | VSHIFTOP(ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(bshape : bshape, vswizzlop_) + | VSHUFFLE(bshape : bshape, `laneidx*` : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(shape : shape, `sx?` : sx?, laneidx : laneidx) + | VREPLACE_LANE(shape : shape, laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(n : n, `instr*` : instr*, `instr*` : instr*) + | `FRAME_%{%}%`(n : n, frame : frame, `instr*` : instr*) + | `HANDLER_%{%}%`(n : n, `catch*` : catch*, `instr*` : instr*) + | TRAP +} + +def $instr_ref(ref) : instr + def $instr_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_instr(x) + def $instr_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_instr + def $instr_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_instr(x) + +def $instr_val(val) : instr + def $instr_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_instr(x0, x1) + def $instr_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_instr(x0, x1) + def $instr_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_instr(x) + def $instr_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_instr + def $instr_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_instr(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{blocktype : blocktype, `instr*` : instr*}: + `%`(BLOCK_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{blocktype : blocktype, `instr*` : instr*}: + `%`(LOOP_instr(blocktype, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{blocktype : blocktype, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`IF%%ELSE%`_instr(blocktype, `instr*`, `instr*_0`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{`labelidx*` : labelidx*, labelidx : labelidx}: + `%`(BR_TABLE_instr(`labelidx*`, labelidx),) + -- (wf_uN: `%%`(32, labelidx))*{labelidx <- `labelidx*`} + -- wf_uN: `%%`(32, labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{labelidx : labelidx, reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(labelidx, reftype, reftype_0),) + -- wf_uN: `%%`(32, labelidx) + -- wf_reftype: `%`(reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{tableidx : tableidx, typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{tableidx : tableidx, typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(tableidx, typeuse),) + -- wf_uN: `%%`(32, tableidx) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{blocktype : blocktype, var_0 : list(syntax catch), `instr*` : instr*}: + `%`(TRY_TABLE_instr(blocktype, var_0, `instr*`),) + -- wf_blocktype: `%`(blocktype,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(tableidx, tableidx_0),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{tableidx : tableidx, elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(tableidx, elemidx),) + -- wf_uN: `%%`(32, tableidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{numtype : numtype, var_0 : loadop_?, memidx : memidx, memarg : memarg}: + `%`(LOAD_instr(numtype, var_0, memidx, memarg),) + -- (wf_loadop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{numtype : numtype, var_0 : storeop_?, memidx : memidx, memarg : memarg}: + `%`(STORE_instr(numtype, var_0, memidx, memarg),) + -- (wf_storeop_: `%%`(numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{vectype : vectype, var_0 : vloadop_?, memidx : memidx, memarg : memarg}: + `%`(VLOAD_instr(vectype, var_0, memidx, memarg),) + -- (wf_vloadop_: `%%`(vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{vectype : vectype, memidx : memidx, memarg : memarg}: + `%`(VSTORE_instr(vectype, memidx, memarg),) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}: + `%`(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx),) + -- wf_sz: `%`(sz,) + -- wf_uN: `%%`(32, memidx) + -- wf_memarg: `%`(memarg,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(memidx, memidx_0),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{memidx : memidx, dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(memidx, dataidx),) + -- wf_uN: `%%`(32, memidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{`sx?` : sx?, typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(`sx?`, typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{typeidx : typeidx, fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(typeidx, fieldidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{typeidx : typeidx, u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(typeidx, u32),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{`sx?` : sx?, typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(`sx?`, typeidx),) + -- wf_uN: `%%`(32, typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(typeidx, typeidx_0),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{typeidx : typeidx, dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(typeidx, dataidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{typeidx : typeidx, elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx),) + -- wf_uN: `%%`(32, typeidx) + -- wf_uN: `%%`(32, elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{numtype : numtype, var_0 : num_}: + `%`(CONST_instr(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(numtype, var_0),) + -- wf_unop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(numtype, var_0),) + -- wf_binop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(numtype, var_0),) + -- wf_testop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(numtype, var_0),) + -- wf_relop_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{vectype : vectype, vvunop : vvunop}: + `%`(VVUNOP_instr(vectype, vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{vectype : vectype, vvbinop : vvbinop}: + `%`(VVBINOP_instr(vectype, vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{vectype : vectype, vvternop : vvternop}: + `%`(VVTERNOP_instr(vectype, vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{vectype : vectype, vvtestop : vvtestop}: + `%`(VVTESTOP_instr(vectype, vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vunop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vbinop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vternop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vtestop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(shape, var_0),) + -- wf_shape: `%`(shape,) + -- wf_vrelop_: `%%`(shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(ishape, var_0),) + -- wf_ishape: `%`(ishape,) + -- wf_vshiftop_: `%%`(ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(bshape, var_0),) + -- wf_bshape: `%`(bshape,) + -- wf_vswizzlop_: `%%`(bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{bshape : bshape, `laneidx*` : laneidx*}: + `%`(VSHUFFLE_instr(bshape, `laneidx*`),) + -- wf_bshape: `%`(bshape,) + -- (wf_uN: `%%`(8, laneidx))*{laneidx <- `laneidx*`} + -- if (`%`_dim(|laneidx*{laneidx <- `laneidx*`}|,) = $dim($proj_bshape_0(bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{shape : shape, `sx?` : sx?, laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(shape, `sx?`, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> ($lanetype(shape) =/= $lanetype_numtype($lunpack($lanetype(shape))))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{shape : shape, laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(shape, laneidx),) + -- wf_shape: `%`(shape,) + -- wf_uN: `%%`(8, laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{n : n, `instr*` : instr*, `instr*_0` : instr*}: + `%`(`LABEL_%{%}%`_instr(n, `instr*`, `instr*_0`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- (wf_instr: `%`(`instr*_0`,))*{`instr*_0` <- `instr*_0`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{n : n, frame : frame, `instr*` : instr*}: + `%`(`FRAME_%{%}%`_instr(n, frame, `instr*`),) + -- wf_frame: `%`(frame,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{n : n, `catch*` : catch*, `instr*` : instr*}: + `%`(`HANDLER_%{%}%`_instr(n, `catch*`, `instr*`),) + -- (wf_catch: `%`(catch,))*{catch <- `catch*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(consttype : consttype, lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I32_consttype, mk_lit__0_lit_(I32_numtype, c)) = CONST_instr(I32_numtype, c) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I64_consttype, mk_lit__0_lit_(I64_numtype, c)) = CONST_instr(I64_numtype, c) + -- wf_instr: `%`(CONST_instr(I64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F32_consttype, mk_lit__0_lit_(F32_numtype, c)) = CONST_instr(F32_numtype, c) + -- wf_instr: `%`(CONST_instr(F32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F64_consttype, mk_lit__0_lit_(F64_numtype, c)) = CONST_instr(F64_numtype, c) + -- wf_instr: `%`(CONST_instr(F64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : uN}(V128_consttype, mk_lit__1_lit_(V128_vectype, c)) = VCONST_instr(V128_vectype, c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{lanetype : lanetype, dim : dim}(`%X%`_shape(lanetype, dim)) = $free_lanetype(lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{`valtype?` : valtype?}(_RESULT_blocktype(valtype#361?{valtype#361 <- `valtype?`})) = $free_opt($free_valtype(valtype)?{valtype <- `valtype?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{typeidx : uN}(_IDX_blocktype(typeidx)) = $free_typeidx(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{tagidx : uN, labelidx : uN}(CATCH_REF_catch(tagidx, labelidx)) = $free_tagidx(tagidx) +++ $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_catch(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{labelidx : uN}(CATCH_ALL_REF_catch(labelidx)) = $free_labelidx(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'#1*{labelidx'#1 <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{labelidx : uN, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'#2*{labelidx'#2 <- `labelidx'*`}) = [`%`_labelidx(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype#362*{valtype#362 <- `valtype*#1`}?{`valtype*#1` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr#2*{instr#2 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr#3*{instr#3 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1#1*{instr_1#1 <- `instr_1*`}, instr_2#1*{instr_2#1 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{labelidx : uN}(BR_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{labelidx : uN}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{`labelidx*` : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx#4*{labelidx#4 <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{labelidx : uN}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{labelidx : uN}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{funcidx : uN}(CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{funcidx : uN}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{tableidx : uN, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{tagidx : uN}(THROW_instr(tagidx)) = $free_tagidx(tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch#1*{catch#1 <- `catch*`},), instr#4*{instr#4 <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_block(instr*{instr <- `instr*`}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{numtype : numtype, numlit : num_}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{numtype : numtype, unop : unop_}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{numtype : numtype, binop : binop_}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{numtype : numtype, testop : testop_}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{numtype : numtype, relop : relop_}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{vectype : vectype, veclit : uN}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{shape : shape, vunop : vunop_}(VUNOP_instr(shape, vunop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{shape : shape, vbinop : vbinop_}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{shape : shape, vternop : vternop_}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{shape : shape, vtestop : vtestop_}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{shape : shape, vrelop : vrelop_}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape($proj_ishape_0(ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx#1*{laneidx#1 <- `laneidx*`})) = $free_shape($proj_bshape_0(bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{shape : shape, `sx?` : sx?, laneidx : uN}(VEXTRACT_LANE_instr(shape, sx#15582?{sx#15582 <- `sx?`}, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{shape : shape, laneidx : uN}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{funcidx : uN}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{typeidx : uN}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{`sx?` : sx?, typeidx : uN, u32 : uN}(`STRUCT.GET`_instr(sx#15583?{sx#15583 <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{typeidx : uN, u32 : uN}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{typeidx : uN}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{typeidx : uN, u32 : uN}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{`sx?` : sx?, typeidx : uN}(`ARRAY.GET`_instr(sx#15584?{sx#15584 <- `sx?`}, typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{typeidx : uN}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{typeidx : uN}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{typeidx : uN, dataidx : uN}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{typeidx : uN, elemidx : uN}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{localidx : uN}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{localidx : uN}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{localidx : uN}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{globalidx : uN}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{globalidx : uN}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{tableidx : uN}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{tableidx : uN}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{tableidx : uN}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{tableidx : uN}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{tableidx : uN}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{tableidx : uN, elemidx : uN}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{elemidx : uN}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{numtype : numtype, `loadop?` : loadop_?, memidx : uN, memarg : memarg}(LOAD_instr(numtype, loadop#1?{loadop#1 <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{numtype : numtype, `storeop?` : storeop_?, memidx : uN, memarg : memarg}(STORE_instr(numtype, storeop#1?{storeop#1 <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{vectype : vectype, `vloadop?` : vloadop_?, memidx : uN, memarg : memarg}(VLOAD_instr(vectype, vloadop#1?{vloadop#1 <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{vectype : vectype, memidx : uN, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{vectype : vectype, sz : sz, memidx : uN, memarg : memarg, laneidx : uN}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{memidx : uN}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{memidx : uN}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{memidx : uN}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{memidx : uN, dataidx : uN}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{dataidx : uN}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{`instr*` : instr*}(instr#5*{instr#5 <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] + -- let{free : free} free = $free_list($free_instr(instr#6)*{instr#6 <- `instr*`}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{`instr*` : instr*}(instr#7*{instr#7 <- `instr*`}) = $free_list($free_instr(instr)*{instr <- `instr*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(tableidx : tableidx, expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{tableidx : tableidx, expr : expr}: + `%`(ACTIVE_elemmode(tableidx, expr),) + -- wf_uN: `%%`(32, tableidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(memidx : memidx, expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{memidx : memidx, expr : expr}: + `%`(ACTIVE_datamode(memidx, expr),) + -- wf_uN: `%%`(32, memidx) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(globaltype : globaltype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(tabletype : tabletype, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{tabletype : tabletype, expr : expr}: + `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(`byte*` : byte*, datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{`byte*` : byte*, datamode : datamode}: + `%`(DATA_data(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_func(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_elem(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(name : name, name : name, externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_import(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(name : name, externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{name : name, externidx : externidx}: + `%`(EXPORT_export(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), `start?` : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), `start?` : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, `start?`, var_9),) + -- (wf_start: `%`(start,))?{start <- `start?`} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{rectype : rectype}(TYPE_type(rectype)) = $free_rectype(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{tagtype : typeuse}(TAG_tag(tagtype)) = $free_tagtype(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{globaltype : globaltype, expr : instr*}(GLOBAL_global(globaltype, expr)) = $free_globaltype(globaltype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{memtype : memtype}(MEMORY_mem(memtype)) = $free_memtype(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{tabletype : tabletype, expr : instr*}(TABLE_table(tabletype, expr)) = $free_tabletype(tabletype) +++ $free_expr(expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{typeidx : uN, `local*` : local*, expr : instr*}(FUNC_func(typeidx, local#1*{local#1 <- `local*`}, expr)) = $free_typeidx(typeidx) +++ $free_list($free_local(local)*{local <- `local*`}) +++ $free_block(expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{memidx : uN, expr : instr*}(ACTIVE_datamode(memidx, expr)) = $free_memidx(memidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{`byte*` : byte*, datamode : datamode}(DATA_data(byte#1*{byte#1 <- `byte*`}, datamode)) = $free_datamode(datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{tableidx : uN, expr : instr*}(ACTIVE_elemmode(tableidx, expr)) = $free_tableidx(tableidx) +++ $free_expr(expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{reftype : reftype, `expr*` : expr*, elemmode : elemmode}(ELEM_elem(reftype, expr#360*{expr#360 <- `expr*`}, elemmode)) = $free_reftype(reftype) +++ $free_list($free_expr(expr)*{expr <- `expr*`}) +++ $free_elemmode(elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{funcidx : uN}(START_start(funcidx)) = $free_funcidx(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, externtype : externtype}(IMPORT_import(name_1, name_2, externtype)) = $free_externtype(externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{name : name, externidx : externidx}(EXPORT_export(name, externidx)) = $free_externidx(externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*}(MODULE_module(`%`_list(type#1*{type#1 <- `type*`},), `%`_list(import#1*{import#1 <- `import*`},), `%`_list(tag#1*{tag#1 <- `tag*`},), `%`_list(global#1*{global#1 <- `global*`},), `%`_list(mem#4*{mem#4 <- `mem*`},), `%`_list(table#4*{table#4 <- `table*`},), `%`_list(func#1*{func#1 <- `func*`},), `%`_list(data#1*{data#1 <- `data*`},), `%`_list(elem#4*{elem#4 <- `elem*`},), start#1?{start#1 <- `start?`}, `%`_list(export#4*{export#4 <- `export*`},))) = $free_list($free_type(type)*{type <- `type*`}) +++ $free_list($free_tag(tag)*{tag <- `tag*`}) +++ $free_list($free_global(global)*{global <- `global*`}) +++ $free_list($free_mem(mem)*{mem <- `mem*`}) +++ $free_list($free_table(table)*{table <- `table*`}) +++ $free_list($free_func(func)*{func <- `func*`}) +++ $free_list($free_data(data)*{data <- `data*`}) +++ $free_list($free_elem(elem)*{elem <- `elem*`}) +++ $free_opt($free_start(start)?{start <- `start?`}) +++ $free_list($free_import(import)*{import <- `import*`}) +++ $free_list($free_export(export)*{export <- `export*`}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{module : module}(module) = $free_module(module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{`func*` : func*}(func#2*{func#2 <- `func*`}) = $free_list($free_func(func)*{func <- `func*`}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(init : init, valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{init : init, valtype : valtype}: + `%`(`%%`_localtype(init, valtype),) + -- wf_valtype: `%`(valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(resulttype : resulttype, `localidx*` : localidx*, resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{resulttype : resulttype, `localidx*` : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(resulttype, `localidx*`, resulttype_0),) + -- (wf_uN: `%%`(32, localidx))*{localidx <- `localidx*`} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(context : context, localidx*, localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, `x*` : idx*, lct_1 : localtype, `lct*` : localtype*}(C, [x_1] ++ x#3*{x#3 <- `x*`}, [lct_1] ++ lct#1*{lct#1 <- `lct*`}) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x*{x <- `x*`}, lct*{lct <- `lct*`}) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{`dt*` : deftype*, dt_n : deftype}(dt#2*{dt#2 <- `dt*`} ++ [dt_n]) = dt'*{dt' <- `dt'*`} ++ [$subst_all_deftype(dt_n, $typeuse_deftype(dt')*{dt' <- `dt'*`})] + -- let{`dt'*` : deftype*} dt'#3*{dt'#3 <- `dt'*`} = $clos_deftypes(dt#3*{dt#3 <- `dt*`}) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(context : context, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#4*{dt#4 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(context : context, deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, $typeuse_deftype(dt')*{dt' <- `dt'*`}) + -- let{`dt'*` : deftype*} dt'#4*{dt'#4 <- `dt'*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(context : context, tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#5*{dt#5 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(context : context, externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#6*{dt#6 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(context : context, moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, $typeuse_deftype(dt)*{dt <- `dt*`}) + -- let{`dt*` : deftype*} dt#7*{dt#7 <- `dt*`} = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, numtype : numtype}: + `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, vectype : vectype}: + `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, packtype : packtype}: + `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, packtype : packtype}: + `%|-%<:%`(C, packtype, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, numtype : numtype}: + `%|-%<:%`(C, numtype, numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{deftype : deftype, comptype : comptype, `final?` : final?, `typeuse*` : typeuse*}: + `%~~%`(deftype, comptype) + -- if ($unrolldt(deftype) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype)) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, vectype : vectype}: + `%|-%<:%`(C, vectype, vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{typeuse : typeuse, i : nat}(typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(context : context, heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{rectype : rectype, n : n, C : context}(C, _DEF_heaptype(rectype, n)) = $unrolldt(_DEF_deftype(rectype, n)) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, typeidx : uN}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, absheaptype : absheaptype}: + `%|-%:OK`(C, $heaptype_absheaptype(absheaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, typeuse : typeuse}: + `%|-%:OK`(C, $heaptype_typeuse(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule _{C : context, heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, numtype : numtype}: + `%|-%:OK`(C, $valtype_numtype(numtype)) + -- Numtype_ok: `%|-%:OK`(C, numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, vectype : vectype}: + `%|-%:OK`(C, $valtype_vectype(vectype)) + -- Vectype_ok: `%|-%:OK`(C, vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, reftype : reftype}: + `%|-%:OK`(C, $valtype_reftype(reftype)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- if (C.TYPES_context[$proj_uN_0(typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, deftype : deftype}: + `%|-%:OK`(C, $typeuse_deftype(deftype)) + -- Deftype_ok: `%|-%:OK`(C, deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule _{C : context, `t*` : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule _{C : context, storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, valtype : valtype}: + `%|-%:OK`(C, $storagetype_valtype(valtype)) + -- Valtype_ok: `%|-%:OK`(C, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, packtype : packtype}: + `%|-%:OK`(C, $storagetype_packtype(packtype)) + -- Packtype_ok: `%|-%:OK`(C, packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, `fieldtype*` : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule _{C : context, `typeuse*` : typeuse*, comptype : comptype, i : nat, `comptype'*` : comptype*, `typeuse'**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype), OK_oktypenat(i)) + -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, typeuse))*{typeuse <- `typeuse*`} + -- (if $before(typeuse, i))*{typeuse <- `typeuse*`} + -- if (|`comptype'*`| = |`typeuse*`|) + -- if (|`comptype'*`| = |`typeuse'**`|) + -- (if ($unrollht_(C, $heaptype_typeuse(typeuse)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype')))*{comptype' <- `comptype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse*{typeuse <- `typeuse*`}, comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, comptype'),))*{comptype' <- `comptype'*`, `typeuse'*` <- `typeuse'**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule _{C : context, rectype : rectype, i : n, n : n, `subtype*` : subtype*}: + `%|-%:OK`(C, _DEF_deftype(rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}} +++ C, rectype, OK_oktypenat(0)) + -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`},))) + -- if (i < n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype^n{subtype <- `subtype*`}},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)), STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},))) + -- if (|`ft_1*`| = |`ft_2*`|) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- `ft_1*`, ft_2 <- `ft_2*`} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1*{ft_1 <- `ft_1*`} ++ ft'_1*{ft'_1 <- `ft'_1*`},)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2*{ft_2 <- `ft_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, `t_11*` : valtype*, `t_12*` : valtype*, `t_21*` : valtype*, `t_22*` : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- if (i < |typeuse*{typeuse <- `typeuse*`}|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_typeuse(typeuse*{typeuse <- `typeuse*`}[i]), $heaptype_deftype(deftype_2)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, heaptype : heaptype}: + `%|-%<:%`(C, heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule `eq-any`{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule `i31-eq`{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule `struct-eq`{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule `array-eq`{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, $heaptype_deftype(deftype), STRUCT_heaptype) + -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, deftype : deftype, fieldtype : fieldtype}: + `%|-%<:%`(C, $heaptype_deftype(deftype), ARRAY_heaptype) + -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, $heaptype_deftype(deftype), FUNC_heaptype) + -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $heaptype_deftype(deftype_1), $heaptype_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_deftype(C.TYPES_context[$proj_uN_0(typeidx).0]), heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: + `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, $heaptype_deftype(C.TYPES_context[$proj_uN_0(typeidx).0])) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule `rec-struct`{C : context, i : n, `final?` : final?, `fieldtype*` : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule `rec-array`{C : context, i : n, `final?` : final?, fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], ARRAY_comptype(fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule `rec-func`{C : context, i : n, `final?` : final?, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule `rec-sub`{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), $heaptype_typeuse(typeuse*{typeuse <- `typeuse*`}[j])) + -- if (j < |typeuse*{typeuse <- `typeuse*`}|) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, ANY_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, FUNC_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, heaptype) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, EXTERN_heaptype) + -- if (heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, $valtype_numtype(numtype_1), $valtype_numtype(numtype_2)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, $valtype_vectype(vectype_1), $valtype_vectype(vectype_2)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, $valtype_reftype(reftype_1), $valtype_reftype(reftype_2)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule _{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`t_1*`| = |`t_2*`|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- `t_1*`} + -- (wf_valtype: `%`(t_2,))*{t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, $storagetype_valtype(valtype_1), $storagetype_valtype(valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, $storagetype_packtype(packtype_1), $storagetype_packtype(packtype_2)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`},)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- if (|`lct*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- `lct*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- `lct*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{deftype : deftype, C : context, comptype : comptype}: + `%~~_%%`($typeuse_deftype(deftype), C, comptype) + -- Expand: `%~~%`(deftype, comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{typeidx : typeidx, C : context, comptype : comptype}: + `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, `x*` : idx*, comptype : comptype, x_0 : idx, `comptype'*` : comptype*, `yy**` : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype), OK_oktypeidx(x_0)) + -- if (|x*{x <- `x*`}| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- `x*`} + -- if (|`comptype'*`| = |`x*`|) + -- if (|`comptype'*`| = |`yy**`|) + -- (if ($proj_uN_0(x).0 < |C.TYPES_context|))*{x <- `x*`} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy*{yy <- `yy*`}, comptype')))*{comptype' <- `comptype'*`, x <- `x*`, `yy*` <- `yy**`} + -- Comptype_ok: `%|-%:OK`(C, comptype) + -- (Comptype_sub: `%|-%<:%`(C, comptype, comptype'))*{comptype' <- `comptype'*`} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy*{yy <- `yy*`}, comptype'),))*{comptype' <- `comptype'*`, `yy*` <- `yy**`} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`},)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(subtype,))*{subtype <- `subtype*`} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, n : n, `m?` : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), k) + -- if (n <= k) + -- (if ((n <= m) /\ (m <= k)))?{m <- `m?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, typeuse : typeuse, `t_1*` : valtype*}: + `%|-%:OK`(C, typeuse) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(addrtype, limits)) + -- Limits_ok: `%|-%:%`(C, limits, (2 ^ ((($size($numtype_addrtype(addrtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule _{C : context, addrtype : addrtype, limits : limits, reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(addrtype, limits, reftype)) + -- Limits_ok: `%|-%:%`(C, limits, ((((2 ^ $size($numtype_addrtype(addrtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits, reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(memtype)) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, typeuse) + -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, `t_11*` : valtype*, `x_1*` : idx*, `t_12*` : valtype*, `t_21*` : valtype*, `x_2*` : idx*, `t_22*` : valtype*, `x*` : idx*, `t*` : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)), `%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`},), `%`_resulttype(t_11*{t_11 <- `t_11*`},)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`},), `%`_resulttype(t_22*{t_22 <- `t_22*`},)) + -- if (x*{x <- `x*`} = $setminus_(syntax localidx, x_2*{x_2 <- `x_2*`}, x_1*{x_1 <- `x_1*`})) + -- if (|`t*`| = |`x*`|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- `x*`} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- `t*`, x <- `x*`} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- `x*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11*{t_11 <- `t_11*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_12*{t_12 <- `t_12*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21*{t_21 <- `t_21*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_22*{t_22 <- `t_22*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, `m_2?` : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- `m_2?`} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- `m_2?`}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $typeuse_deftype(deftype_1), $typeuse_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(addrtype, limits_1), `%%PAGE`_memtype(addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule _{C : context, addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(addrtype, limits_1, reftype_1), `%%%`_tabletype(addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype($typeuse_deftype(deftype_1)), FUNC_externtype($typeuse_deftype(deftype_2))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_1)),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_2)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, `valtype?` : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype?{valtype <- `valtype?`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),))) + -- (Valtype_ok: `%|-%:OK`(C, valtype))?{valtype <- `valtype?`} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype?{valtype <- `valtype?`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype?{valtype <- `valtype?`}),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, typeidx : typeidx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, _IDX_blocktype(typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, `t*` : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I32_valtype) = ?(?(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I64_valtype) = ?(?(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F32_valtype) = ?(?(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F64_valtype) = ?(?(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(V128_valtype) = ?(?(VCONST_val(V128_vectype, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(V128_vectype, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{n : n, m : m, at : addrtype, N : N}: + `|-%:%->%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}, at, N) + -- if (((2 ^ n) : nat <:> rat) <= ((N : nat <:> rat) / (8 : nat <:> rat))) + -- if (m < (2 ^ $size($numtype_addrtype(at)))) + -- wf_memarg: `%`({ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= $storagetype_valtype($unpack(zt))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule `select-expl`{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule `select-impl`{C : context, t : valtype, t' : valtype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = $valtype_numtype(numtype)) \/ (t' = $valtype_vectype(vectype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1*{t_1 <- `t_1*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x_1*` : idx*, `x_2*` : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, `t*` : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, `l*` : labelidx*, l' : labelidx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l*{l <- `l*`}, l'), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (if ($proj_uN_0(l).0 < |C.LABELS_context|))*{l <- `l*`} + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l).0]))*{l <- `l*`} + -- if ($proj_uN_0(l').0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t*{t <- `t*`},), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`} ++ [I32_valtype],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t*{t <- `t*`}) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, `t*` : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype($diffrt(rt_1, rt_2))],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype($diffrt(rt_1, rt_2))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_2)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t*{t <- `t*`} ++ [$valtype_reftype(rt_2)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule `ref.null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule `ref.func`{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (|C.REFS_context| > 0) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule `ref.i31`{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule `ref.is_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule `ref.as_non_null`{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule `ref.eq`{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule `ref.test`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule `i31.get`{C : context, sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule `struct.new_default`{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut?{mut <- `mut?`}, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if ($proj_uN_0(i).0 < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, $storagetype_reftype(rt)))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, $storagetype_reftype(rt))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (($unpack(zt) = $valtype_numtype(numtype)) \/ ($unpack(zt) = $valtype_vectype(vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule `array.set`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule `array.len`{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule `array.fill`{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- if ($proj_uN_0(x_2).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Storagetype_sub: `%|-%<:%`(C, $storagetype_reftype(C.ELEMS_context[$proj_uN_0(y).0]), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = $valtype_numtype(numtype)) \/ ($unpack(zt) = $valtype_vectype(vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) + -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule `local.get`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule `local.set`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule `local.tee`{C : context, x : idx, t : valtype, init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule `global.set`{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if ($proj_uN_0(x_2).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule `elem.drop`{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if ($proj_uN_0(x_2).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule `data.drop`{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(Inn)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(K,), sx))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(Inn)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(Inn)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(K,),))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(Inn)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, (N * $proj_dim_0(M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(memarg, at, N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($dim($proj_bshape_0(sh).0)).0)))*{i <- `i*`} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr*{instr <- `instr*`}, it') + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*, `t*` : valtype*}: + `%|-%:%`(C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.null`{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.i31`{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `ref.func`{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `struct.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_default`{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `array.new_fixed`{C : context, x : idx, n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `any.convert_extern`{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `extern.convert_any`{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule `global.get`{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr($numtype_addrtype(Inn), binop)) + -- if (Inn <- [I32_Inn I64_Inn]) + -- if (|[mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]| > 0) + -- if (binop <- [mk_binop__0_binop_(Inn, ADD_binop_Inn) mk_binop__0_binop_(Inn, SUB_binop_Inn) mk_binop__0_binop_(Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr($numtype_addrtype(Inn), binop),) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(Inn), mk_binop__0_binop_(Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, `instr*` : instr*}: + `%|-%CONST`(C, instr*{instr <- `instr*`}) + -- (Instr_const: `%|-%CONST`(C, instr))*{instr <- `instr*`} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule _{C : context, expr : expr, t : valtype}: + `%|-%:%CONST`(C, expr, t) + -- Expr_ok: `%|-%:%`(C, expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, rectype : rectype, `dt*` : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(rectype), dt*{dt <- `dt*`}) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt*{dt <- `dt*`} = $rolldt(x, rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt*{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(tagtype), $clos_tagtype(C, tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, globaltype : globaltype, expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(globaltype, expr), globaltype) + -- Globaltype_ok: `%|-%:OK`(C, globaltype) + -- if (globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(globaltype, expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(memtype), memtype) + -- Memtype_ok: `%|-%:OK`(C, memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, tabletype : tabletype, expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(tabletype, expr), tabletype) + -- Tabletype_ok: `%|-%:OK`(C, tabletype) + -- if (tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_reftype(rt)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(tabletype, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx, `local*` : local*, expr : expr, `t_1*` : valtype*, `t_2*` : valtype*, `lct*` : localtype*}: + `%|-%:%`(C, FUNC_func(x, local*{local <- `local*`}, expr), C.TYPES_context[$proj_uN_0(x).0]) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`lct*`| = |`local*`|) + -- (Local_ok: `%|-%:%`(C, local, lct))*{lct <- `lct*`, local <- `local*`} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []}, expr, `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local*{local <- `local*`}, expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- `t_1*`} ++ lct*{lct <- `lct*`}, LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(`%`_resulttype(t_2*{t_2 <- `t_2*`},)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, expr), OK_datatype) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, `b*` : byte*, datamode : datamode}: + `%|-%:%`(C, DATA_data(b*{b <- `b*`}, datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b*{b <- `b*`}, datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, expr), rt) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, elemtype : elemtype, `expr*` : expr*, elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode), elemtype) + -- Reftype_ok: `%|-%:OK`(C, elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, expr, $valtype_reftype(elemtype)))*{expr <- `expr*`} + -- Elemmode_ok: `%|-%:%`(C, elemmode, elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(elemtype, expr*{expr <- `expr*`}, elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype($typeuse_deftype(dt))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(dt)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{C : context, name : name, externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(name, externidx), name, xt) + -- Externidx_ok: `%|-%:%`(C, externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(name, externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: + `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_globaltype: `%`(gt,))*{gt <- `gt*`} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: + `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) + -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt*{dt <- `dt*`}) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1*{dt_1 <- `dt_1*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}: + `%`(`%%%%%`_nonfuncs(`global*`, `mem*`, `table*`, `elem*`, `export*`),) + -- (wf_global: `%`(global,))*{global <- `global*`} + -- (wf_mem: `%`(mem,))*{mem <- `mem*`} + -- (wf_table: `%`(table,))*{table <- `table*`} + -- (wf_elem: `%`(elem,))*{elem <- `elem*`} + -- (wf_export: `%`(export,))*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{`global*` : global*, `mem*` : mem*, `table*` : table*, `elem*` : elem*, `export*` : export*}(`%%%%%`_nonfuncs(global#2*{global#2 <- `global*`}, mem#5*{mem#5 <- `mem*`}, table#5*{table#5 <- `table*`}, elem#5*{elem#5 <- `elem*`}, export#6*{export#6 <- `export*`})) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem*{elem <- `elem*`},), ?(), `%`_list(export*{export <- `export*`},))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global#3*{global#3 <- `global*`},), `%`_list(mem#6*{mem#6 <- `mem*`},), `%`_list(table#6*{table#6 <- `table*`},), `%`_list([],), `%`_list([],), `%`_list(elem#6*{elem#6 <- `elem*`},), ?(), `%`_list(export#7*{export#7 <- `export*`},)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + `|-%:%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) + -- if (|`import*`| = |`xt_I*`|) + -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} + -- if (|`jt*`| = |`tag*`|) + -- (Tag_ok: `%|-%:%`(C', tag, jt))*{jt <- `jt*`, tag <- `tag*`} + -- Globals_ok: `%|-%:%`(C', global*{global <- `global*`}, gt*{gt <- `gt*`}) + -- if (|`mem*`| = |`mt*`|) + -- (Mem_ok: `%|-%:%`(C', mem, mt))*{mem <- `mem*`, mt <- `mt*`} + -- if (|`table*`| = |`tt*`|) + -- (Table_ok: `%|-%:%`(C', table, tt))*{table <- `table*`, tt <- `tt*`} + -- if (|`dt*`| = |`func*`|) + -- (Func_ok: `%|-%:%`(C, func, dt))*{dt <- `dt*`, func <- `func*`} + -- if (|`data*`| = |`ok*`|) + -- (Data_ok: `%|-%:%`(C, data, ok))*{data <- `data*`, ok <- `ok*`} + -- if (|`elem*`| = |`rt*`|) + -- (Elem_ok: `%|-%:%`(C, elem, rt))*{elem <- `elem*`, rt <- `rt*`} + -- (Start_ok: `%|-%:OK`(C, start))?{start <- `start?`} + -- if (|`export*`| = |`nm*`|) + -- if (|`export*`| = |`xt_E*`|) + -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} + -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) + -- if (C = C' +++ {TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []}) + -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}))) + -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) + -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- `nm*`} + -- wf_module: `%`(MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'*{dt' <- `dt'*`}, TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}, export*{export <- `export*`}),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed2(relaxed2 : relaxed2, syntax X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $relaxed4(relaxed4 : relaxed4, syntax X, X : X, X : X, X : X, X : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(N : N, iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(N : N, fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(N : N, iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(N : N, fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(numtype : numtype, num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(vectype : vectype, vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(storagetype : storagetype, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(Cnn : Cnn, lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(N : N, bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(N : N, bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(N : N, byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(N : N, byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(numtype : numtype, byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(vectype : vectype, byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(storagetype : storagetype, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(Cnn : Cnn, byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{N : nat, i : nat}(N, i) = ((i : nat <:> int) - ((2 ^ N) : nat <:> int)) + -- if (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{N : nat, i : int}(N, i) = ((i + ((2 ^ N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sx(storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(BOT_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(V128_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(F32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I8_storagetype) = ?(S_sx) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sx(I16_storagetype) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zero(lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I32_lanetype) = mk_lane__2_lane_(I32_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I64_lanetype) = mk_lane__2_lane_(I64_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I8_lanetype) = mk_lane__2_lane_(I8_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(I16_lanetype) = mk_lane__2_lane_(I16_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F32_lanetype) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn)))))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $zero(F64_lanetype) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{N : nat, i : int}(N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{N : nat, i : int}(N, i) = (if (i < - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{N : nat, i_1 : uN}(N, i_1) = `%`_iN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN((((((2 ^ N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(N : N, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{N : nat, i_1 : uN}(N, i_1) = (if ($signed_(N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(N : N, K : K, sx : sx, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ K)),) + -- wf_uN: `%%`(N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{N : nat, K : nat, i : uN}(N, K, S_sx, i) = `%`_iN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $signed_(K, ($proj_uN_0(i).0 \ (2 ^ K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(N, `%`_uN(((((((2 ^ N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(N : N, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),) + -- wf_uN: `%%`(N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $truncz((($signed_(N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(N : N, sx : sx, iN : iN, iN : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN}(N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = (if ($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) + $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_iN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(N, `%`_uN($sat_u_(N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(N, `%`_uN($inv_signed_(N, $sat_s_(N, ($signed_(N, $proj_uN_0(i_1).0) - $signed_(N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(N : N, sx : sx, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(N : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(N : N, sx : sx, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(N : N, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(N : N, iN : iN, iN : iN, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(N : N, iN : iN, iN : iN, iN : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(N : N, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{N : nat, i_1 : uN}(N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(N : N, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{N : nat, i_1 : uN, i_2 : uN}(N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) < $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) > $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) <= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(N : N, sx : sx, iN : iN, iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{N : nat, i_1 : uN, i_2 : uN}(N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(N, $proj_uN_0(i_1).0) >= $signed_(N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(N : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(N : N, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(N : N, fN : fN, fN : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(N : N, fN : fN, fN : fN, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(N : N, N' : N, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(N : N, N' : N, sx : sx, fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(N : N, N' : N, fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(N : N, N' : N, sx : sx, iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(N : N, N' : N, sx : sx, iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(lanetype : lanetype, num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I32_lanetype, c) = mk_lane__0_lane_(I32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I32_numtype), mk_lane__0_lane_(I32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I64_lanetype, c) = mk_lane__0_lane_(I64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I64_numtype), mk_lane__0_lane_(I64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F32_lanetype, c) = mk_lane__0_lane_(F32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F32_numtype), mk_lane__0_lane_(F32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F64_lanetype, c) = mk_lane__0_lane_(F64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F64_numtype), mk_lane__0_lane_(F64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I8_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I8_packtype), mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I16_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I16_packtype), mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I8_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I8_packtype), mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I16_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I16_packtype), mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(lanetype : lanetype, lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I32_lanetype, mk_lane__0_lane_(I32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I64_lanetype, mk_lane__0_lane_(I64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F32_lanetype, mk_lane__0_lane_(F32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F64_lanetype, mk_lane__0_lane_(F64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I8_lanetype, mk_lane__1_lane_(I8_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I8_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I16_lanetype, mk_lane__1_lane_(I16_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I16_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(storagetype : storagetype, lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I8_storagetype, mk_lit__2_lit_(I8_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I8_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I16_storagetype, mk_lit__2_lit_(I16_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I16_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $unop_(numtype : numtype, unop_ : unop_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{N' : nat, i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#2)*{iter_0#2 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#1)))*{iter_0#1 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#4)*{iter_0#4 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#3)))*{iter_0#3 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#6)*{iter_0#6 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#5)))*{iter_0#5 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#8)*{iter_0#8 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#7)))*{iter_0#7 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#10)*{iter_0#10 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#9)))*{iter_0#9 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#12)*{iter_0#12 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#11)))*{iter_0#11 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#14)*{iter_0#14 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#13)))*{iter_0#13 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#16)*{iter_0#16 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#15)))*{iter_0#15 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#18)*{iter_0#18 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#17)))*{iter_0#17 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#20)*{iter_0#20 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#19)))*{iter_0#19 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#22)*{iter_0#22 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#21)))*{iter_0#21 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#24)*{iter_0#24 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#23)))*{iter_0#23 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F32_Fnn, f)) = mk_num__1_num_(F32_Fnn, iter_0#26)*{iter_0#26 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#25)))*{iter_0#25 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $unop_{f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F64_Fnn, f)) = mk_num__1_num_(F64_Fnn, iter_0#28)*{iter_0#28 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#27)))*{iter_0#27 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $binop_(numtype : numtype, binop_ : binop_, num_ : num_, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#30)*{iter_0#30 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#29)))*{iter_0#29 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#32)*{iter_0#32 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#31)))*{iter_0#31 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#34)*{iter_0#34 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#33)))*{iter_0#33 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#36)*{iter_0#36 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#35)))*{iter_0#35 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#38)*{iter_0#38 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#37)))*{iter_0#37 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#40)*{iter_0#40 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#39)))*{iter_0#39 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#42)*{iter_0#42 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#41)))*{iter_0#41 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#44)*{iter_0#44 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#43)))*{iter_0#43 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#46)*{iter_0#46 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#45)))*{iter_0#45 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#48)*{iter_0#48 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#47)))*{iter_0#47 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#50)*{iter_0#50 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#49)))*{iter_0#49 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#52)*{iter_0#52 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#51)))*{iter_0#51 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#54)*{iter_0#54 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#53)))*{iter_0#53 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#56)*{iter_0#56 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#55)))*{iter_0#55 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#58)*{iter_0#58 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#57)))*{iter_0#57 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#60)*{iter_0#60 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#59)))*{iter_0#59 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#62)*{iter_0#62 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#61)))*{iter_0#61 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#64)*{iter_0#64 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#63)))*{iter_0#63 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $testop_(numtype : numtype, testop_ : testop_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn), mk_num__0_num_(I32_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I32_Inn)), i) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $testop_{i : uN}(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn), mk_num__0_num_(I64_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I64_Inn)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relop_(numtype : numtype, relop_ : relop_, num_ : num_, num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I32_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I64_Inn)), sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cvtop__(numtype_1 : numtype, numtype_2 : numtype, cvtop__ : cvtop__, num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#66)*{iter_0#66 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#65)))*{iter_0#65 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#68)*{iter_0#68 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#67)))*{iter_0#67 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#70)*{iter_0#70 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#69)))*{iter_0#69 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#72)*{iter_0#72 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#71)))*{iter_0#71 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#74)*{iter_0#74 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#73)))*{iter_0#73 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#76)*{iter_0#76 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#75)))*{iter_0#75 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#78)*{iter_0#78 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#77)))*{iter_0#77 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#80)*{iter_0#80 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#79)))*{iter_0#79 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{sx : sx, i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#82)*{iter_0#82 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#81)))*{iter_0#81 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#84)*{iter_0#84 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#83)))*{iter_0#83 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#86)*{iter_0#86 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#85)))*{iter_0#85 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#88)*{iter_0#88 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#87)))*{iter_0#87 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#90)*{iter_0#90 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#89)))*{iter_0#89 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#92)*{iter_0#92 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#91)))*{iter_0#91 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#94)*{iter_0#94 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#93)))*{iter_0#93 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#96)*{iter_0#96 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#95)))*{iter_0#95 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cvtop__{f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(shape : shape, vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(shape : shape, lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2753?{half#2753 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2755?{half#2755 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2757?{half#2757 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2759?{half#2759 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2761?{half#2761 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2763?{half#2763 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2765?{half#2765 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2767?{half#2767 <- `half?`}, sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2753?{zero#2753 <- `zero?`}))) = zero#2754?{zero#2754 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2756?{zero#2756 <- `zero?`}))) = zero#2757?{zero#2757 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2759?{zero#2759 <- `zero?`}))) = zero#2760?{zero#2760 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2762?{zero#2762 <- `zero?`}))) = zero#2763?{zero#2763 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2765?{zero#2765 <- `zero?`}))) = zero#2766?{zero#2766 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2768?{zero#2768 <- `zero?`}))) = zero#2769?{zero#2769 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2771?{zero#2771 <- `zero?`}))) = zero#2772?{zero#2772 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2774?{zero#2774 <- `zero?`}))) = zero#2775?{zero#2775 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2777?{zero#2777 <- `zero?`}))) = zero#2778?{zero#2778 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2780?{zero#2780 <- `zero?`}))) = zero#2781?{zero#2781 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2783?{zero#2783 <- `zero?`}))) = zero#2784?{zero#2784 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2786?{zero#2786 <- `zero?`}))) = zero#2787?{zero#2787 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2789?{zero#2789 <- `zero?`}))) = zero#2790?{zero#2790 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2792?{zero#2792 <- `zero?`}))) = zero#2793?{zero#2793 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2795?{zero#2795 <- `zero?`}))) = zero#2796?{zero#2796 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2798?{zero#2798 <- `zero?`}))) = zero#2799?{zero#2799 <- `zero?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?(zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half : half, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx))) = ?(half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2801?{half#2801 <- `half?`}, sx))) = half#2802?{half#2802 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2804?{half#2804 <- `half?`}, sx))) = half#2805?{half#2805 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2807?{half#2807 <- `half?`}, sx))) = half#2808?{half#2808 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2810?{half#2810 <- `half?`}, sx))) = half#2811?{half#2811 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2813?{half#2813 <- `half?`}, sx))) = half#2814?{half#2814 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2816?{half#2816 <- `half?`}, sx))) = half#2817?{half#2817 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2819?{half#2819 <- `half?`}, sx))) = half#2820?{half#2820 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2822?{half#2822 <- `half?`}, sx))) = half#2823?{half#2823 <- `half?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2801?{zero#2801 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2803?{zero#2803 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2805?{zero#2805 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2807?{zero#2807 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2809?{zero#2809 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2811?{zero#2811 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2813?{zero#2813 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2815?{zero#2815 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2817?{zero#2817 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2819?{zero#2819 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2821?{zero#2821 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2823?{zero#2823 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2825?{zero#2825 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2827?{zero#2827 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2829?{zero#2829 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2831?{zero#2831 <- `zero?`}))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $half(half : half, nat : nat, nat : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#1*{c#1 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(N : N, iN*, iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{N : nat, `c*` : iN*, i : uN}(N, c#2*{c#2 <- `c*`}, i) = (if ($proj_uN_0(i).0 < |c*{c <- `c*`}|) then c*{c <- `c*`}[$proj_uN_0(i).0] else (if ($signed_(N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c*{c <- `c*`}[($proj_uN_0(i).0 \ |c*{c <- `c*`}|)]))) + -- wf_uN: `%%`(N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(shape : shape, def $f_(N : N, iN : iN) : iN, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#5)*{c#5 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#1*{c_1#1 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#3*{c#3 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#2)))*{c_1#2 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#4)))*{c#4 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#8)*{c#8 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#3*{c_1#3 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#6*{c#6 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#4)))*{c_1#4 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#7)))*{c#7 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#11)*{c#11 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#5*{c_1#5 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#9*{c#9 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#6)))*{c_1#6 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#10)))*{c#10 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{M : dim, def $f_(N : N, iN : iN) : iN, v_1 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#14)*{c#14 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#7*{c_1#7 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#12*{c#12 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#8)))*{c_1#8 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#13)))*{c#13 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(shape : shape, def $f_(N : N, fN : fN) : fN*, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#17)))*{c#17 <- `c*#3`})*{`c*#3` <- `c**`} + -- let{`c_1*` : lane_*} c_1#9*{c_1#9 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c**` : lane_**} c#15*{c#15 <- `c*#1`}*{`c*#1` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#97))*{iter_0#97 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#10)))))}*{c_1#10 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#16)))))*{c#16 <- `c*#2`}*{`c*#2` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#98))))*{iter_0#98 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#11)))))}*{c_1#11 <- `c_1*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{M : dim, def $f_(N : N, fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#20)))*{c#20 <- `c*#6`})*{`c*#6` <- `c**`} + -- let{`c_1*` : lane_*} c_1#12*{c_1#12 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c**` : lane_**} c#18*{c#18 <- `c*#4`}*{`c*#4` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#99))*{iter_0#99 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#13)))))}*{c_1#13 <- `c_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#19)))))*{c#19 <- `c*#5`}*{`c*#5` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#100))))*{iter_0#100 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#14)))))}*{c_1#14 <- `c_1*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#23)*{c#23 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#15*{c_1#15 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#1*{c_2#1 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#21*{c#21 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#16)), !($proj_lane__2(c_2#2)))*{c_1#16 <- `c_1*`, c_2#2 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#22)))*{c#22 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#26)*{c#26 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#17*{c_1#17 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#3*{c_2#3 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#24*{c#24 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#18)), !($proj_lane__2(c_2#4)))*{c_1#18 <- `c_1*`, c_2#4 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#25)))*{c#25 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#29)*{c#29 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#19*{c_1#19 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#5*{c_2#5 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#27*{c#27 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#20)), !($proj_lane__2(c_2#6)))*{c_1#20 <- `c_1*`, c_2#6 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#28)))*{c#28 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#32)*{c#32 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#21*{c_1#21 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#7*{c_2#7 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#30*{c#30 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#22)), !($proj_lane__2(c_2#8)))*{c_1#22 <- `c_1*`, c_2#8 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#31)))*{c#31 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#35)*{c#35 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#23*{c_1#23 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#9*{c_2#9 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#33*{c#33 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#24)), !($proj_lane__2(c_2#10)))*{c_1#24 <- `c_1*`, c_2#10 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#34)))*{c#34 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#38)*{c#38 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#25*{c_1#25 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#11*{c_2#11 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#36*{c#36 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#26)), !($proj_lane__2(c_2#12)))*{c_1#26 <- `c_1*`, c_2#12 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#37)))*{c#37 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#41)*{c#41 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#27*{c_1#27 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#13*{c_2#13 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#39*{c#39 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#28)), !($proj_lane__2(c_2#14)))*{c_1#28 <- `c_1*`, c_2#14 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#40)))*{c#40 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#44)*{c#44 <- `c*`})] + -- let{`c_1*` : lane_*} c_1#29*{c_1#29 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#15*{c_2#15 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#42*{c#42 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#30)), !($proj_lane__2(c_2#16)))*{c_1#30 <- `c_1*`, c_2#16 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#43)))*{c#43 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#47)))*{c#47 <- `c*#9`})*{`c*#9` <- `c**`} + -- let{`c_1*` : lane_*} c_1#31*{c_1#31 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#17*{c_2#17 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c**` : lane_**} c#45*{c#45 <- `c*#7`}*{`c*#7` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#101)*{iter_0#101 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#32)), !($proj_lane__2(c_2#18)))}*{c_1#32 <- `c_1*`, c_2#18 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#46)))))*{c#46 <- `c*#8`}*{`c*#8` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#102)))*{iter_0#102 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#33)), !($proj_lane__2(c_2#19)))}*{c_1#33 <- `c_1*`, c_2#19 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#50)))*{c#50 <- `c*#12`})*{`c*#12` <- `c**`} + -- let{`c_1*` : lane_*} c_1#34*{c_1#34 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#20*{c_2#20 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c**` : lane_**} c#48*{c#48 <- `c*#10`}*{`c*#10` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#103)*{iter_0#103 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#35)), !($proj_lane__2(c_2#21)))}*{c_1#35 <- `c_1*`, c_2#21 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#49)))))*{c#49 <- `c*#11`}*{`c*#11` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#104)))*{iter_0#104 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#36)), !($proj_lane__2(c_2#22)))}*{c_1#36 <- `c_1*`, c_2#22 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#53)))*{c#53 <- `c*#15`})*{`c*#15` <- `c**`} + -- let{`c_1*` : lane_*} c_1#37*{c_1#37 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#23*{c_2#23 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c**` : lane_**} c#51*{c#51 <- `c*#13`}*{`c*#13` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#105)*{iter_0#105 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#38)), !($proj_lane__2(c_2#24)))}*{c_1#38 <- `c_1*`, c_2#24 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#52)))))*{c#52 <- `c*#14`}*{`c*#14` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#106)))*{iter_0#106 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#39)), !($proj_lane__2(c_2#25)))}*{c_1#39 <- `c_1*`, c_2#25 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN*, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#56)))*{c#56 <- `c*#18`})*{`c*#18` <- `c**`} + -- let{`c_1*` : lane_*} c_1#40*{c_1#40 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#26*{c_2#26 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c**` : lane_**} c#54*{c#54 <- `c*#16`}*{`c*#16` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#107)*{iter_0#107 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#41)), !($proj_lane__2(c_2#27)))}*{c_1#41 <- `c_1*`, c_2#27 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#55)))))*{c#55 <- `c*#17`}*{`c*#17` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#108)))*{iter_0#108 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#42)), !($proj_lane__2(c_2#28)))}*{c_1#42 <- `c_1*`, c_2#28 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#59)))*{c#59 <- `c*#21`})*{`c*#21` <- `c**`} + -- let{`c_1*` : lane_*} c_1#43*{c_1#43 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#29*{c_2#29 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c**` : lane_**} c#57*{c#57 <- `c*#19`}*{`c*#19` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#109))*{iter_0#109 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#44)))), !($proj_num__1(!($proj_lane__0(c_2#30)))))}*{c_1#44 <- `c_1*`, c_2#30 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#58)))))*{c#58 <- `c*#20`}*{`c*#20` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#110))))*{iter_0#110 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#45)))), !($proj_num__1(!($proj_lane__0(c_2#31)))))}*{c_1#45 <- `c_1*`, c_2#31 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#62)))*{c#62 <- `c*#24`})*{`c*#24` <- `c**`} + -- let{`c_1*` : lane_*} c_1#46*{c_1#46 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#32*{c_2#32 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c**` : lane_**} c#60*{c#60 <- `c*#22`}*{`c*#22` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#111))*{iter_0#111 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#47)))), !($proj_num__1(!($proj_lane__0(c_2#33)))))}*{c_1#47 <- `c_1*`, c_2#33 <- `c_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#61)))))*{c#61 <- `c*#23`}*{`c*#23` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#112))))*{iter_0#112 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#48)))), !($proj_num__1(!($proj_lane__0(c_2#34)))))}*{c_1#48 <- `c_1*`, c_2#34 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(shape : shape, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#65)))*{c#65 <- `c*#27`})*{`c*#27` <- `c**`} + -- let{`c_1*` : lane_*} c_1#49*{c_1#49 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#35*{c_2#35 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#1*{c_3#1 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_3) + -- let{`c**` : lane_**} c#63*{c#63 <- `c*#25`}*{`c*#25` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#113)*{iter_0#113 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#50)), !($proj_lane__2(c_2#36)), !($proj_lane__2(c_3#2)))}*{c_1#50 <- `c_1*`, c_2#36 <- `c_2*`, c_3#2 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#64)))))*{c#64 <- `c*#26`}*{`c*#26` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#114)))*{iter_0#114 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#51)), !($proj_lane__2(c_2#37)), !($proj_lane__2(c_3#3)))}*{c_1#51 <- `c_1*`, c_2#37 <- `c_2*`, c_3#3 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#68)))*{c#68 <- `c*#30`})*{`c*#30` <- `c**`} + -- let{`c_1*` : lane_*} c_1#52*{c_1#52 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#38*{c_2#38 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#4*{c_3#4 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_3) + -- let{`c**` : lane_**} c#66*{c#66 <- `c*#28`}*{`c*#28` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#115)*{iter_0#115 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#53)), !($proj_lane__2(c_2#39)), !($proj_lane__2(c_3#5)))}*{c_1#53 <- `c_1*`, c_2#39 <- `c_2*`, c_3#5 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#67)))))*{c#67 <- `c*#29`}*{`c*#29` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#116)))*{iter_0#116 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#54)), !($proj_lane__2(c_2#40)), !($proj_lane__2(c_3#6)))}*{c_1#54 <- `c_1*`, c_2#40 <- `c_2*`, c_3#6 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#71)))*{c#71 <- `c*#33`})*{`c*#33` <- `c**`} + -- let{`c_1*` : lane_*} c_1#55*{c_1#55 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#41*{c_2#41 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#7*{c_3#7 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_3) + -- let{`c**` : lane_**} c#69*{c#69 <- `c*#31`}*{`c*#31` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#117)*{iter_0#117 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#56)), !($proj_lane__2(c_2#42)), !($proj_lane__2(c_3#8)))}*{c_1#56 <- `c_1*`, c_2#42 <- `c_2*`, c_3#8 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#70)))))*{c#70 <- `c*#32`}*{`c*#32` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#118)))*{iter_0#118 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#57)), !($proj_lane__2(c_2#43)), !($proj_lane__2(c_3#9)))}*{c_1#57 <- `c_1*`, c_2#43 <- `c_2*`, c_3#9 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{M : dim, def $f_(N : N, iN : iN, iN : iN, iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#74)))*{c#74 <- `c*#36`})*{`c*#36` <- `c**`} + -- let{`c_1*` : lane_*} c_1#58*{c_1#58 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#44*{c_2#44 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#10*{c_3#10 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_3) + -- let{`c**` : lane_**} c#72*{c#72 <- `c*#34`}*{`c*#34` <- `c**`} = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#119)*{iter_0#119 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#59)), !($proj_lane__2(c_2#45)), !($proj_lane__2(c_3#11)))}*{c_1#59 <- `c_1*`, c_2#45 <- `c_2*`, c_3#11 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#73)))))*{c#73 <- `c*#35`}*{`c*#35` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#120)))*{iter_0#120 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#60)), !($proj_lane__2(c_2#46)), !($proj_lane__2(c_3#12)))}*{c_1#60 <- `c_1*`, c_2#46 <- `c_2*`, c_3#12 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(shape : shape, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#77)))*{c#77 <- `c*#39`})*{`c*#39` <- `c**`} + -- let{`c_1*` : lane_*} c_1#61*{c_1#61 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#47*{c_2#47 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#13*{c_3#13 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_3) + -- let{`c**` : lane_**} c#75*{c#75 <- `c*#37`}*{`c*#37` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#121))*{iter_0#121 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#62)))), !($proj_num__1(!($proj_lane__0(c_2#48)))), !($proj_num__1(!($proj_lane__0(c_3#14)))))}*{c_1#62 <- `c_1*`, c_2#48 <- `c_2*`, c_3#14 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#76)))))*{c#76 <- `c*#38`}*{`c*#38` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#122))))*{iter_0#122 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#63)))), !($proj_num__1(!($proj_lane__0(c_2#49)))), !($proj_num__1(!($proj_lane__0(c_3#15)))))}*{c_1#63 <- `c_1*`, c_2#49 <- `c_2*`, c_3#15 <- `c_3*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{M : dim, def $f_(N : N, fN : fN, fN : fN, fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#80)))*{c#80 <- `c*#42`})*{`c*#42` <- `c**`} + -- let{`c_1*` : lane_*} c_1#64*{c_1#64 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#50*{c_2#50 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c_3*` : lane_*} c_3#16*{c_3#16 <- `c_3*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_3) + -- let{`c**` : lane_**} c#78*{c#78 <- `c*#40`}*{`c*#40` <- `c**`} = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#123))*{iter_0#123 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#65)))), !($proj_num__1(!($proj_lane__0(c_2#51)))), !($proj_num__1(!($proj_lane__0(c_3#17)))))}*{c_1#65 <- `c_1*`, c_2#51 <- `c_2*`, c_3#17 <- `c_3*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#79)))))*{c#79 <- `c*#41`}*{`c*#41` <- `c**`} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#124))))*{iter_0#124 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#66)))), !($proj_num__1(!($proj_lane__0(c_2#52)))), !($proj_num__1(!($proj_lane__0(c_3#18)))))}*{c_1#66 <- `c_1*`, c_2#52 <- `c_2*`, c_3#18 <- `c_3*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#83)*{c#83 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#67*{c_1#67 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#53*{c_2#53 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#81*{c#81 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#68)), !($proj_lane__2(c_2#54)))).0,))*{c_1#68 <- `c_1*`, c_2#54 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#82)))*{c#82 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#69)), !($proj_lane__2(c_2#55)))).0,)))*{c_1#69 <- `c_1*`, c_2#55 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#86)*{c#86 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#70*{c_1#70 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#56*{c_2#56 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#84*{c#84 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#71)), !($proj_lane__2(c_2#57)))).0,))*{c_1#71 <- `c_1*`, c_2#57 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#85)))*{c#85 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#72)), !($proj_lane__2(c_2#58)))).0,)))*{c_1#72 <- `c_1*`, c_2#58 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#89)*{c#89 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#73*{c_1#73 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#59*{c_2#59 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#87*{c#87 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#74)), !($proj_lane__2(c_2#60)))).0,))*{c_1#74 <- `c_1*`, c_2#60 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#88)))*{c#88 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#75)), !($proj_lane__2(c_2#61)))).0,)))*{c_1#75 <- `c_1*`, c_2#61 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#92)*{c#92 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#76*{c_1#76 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#62*{c_2#62 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#90*{c#90 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#77)), !($proj_lane__2(c_2#63)))).0,))*{c_1#77 <- `c_1*`, c_2#63 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#91)))*{c#91 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#78)), !($proj_lane__2(c_2#64)))).0,)))*{c_1#78 <- `c_1*`, c_2#64 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#95)*{c#95 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#79*{c_1#79 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#65*{c_2#65 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#93*{c#93 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#80)), !($proj_lane__2(c_2#66)))).0,))*{c_1#80 <- `c_1*`, c_2#66 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#94)))*{c#94 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#81)), !($proj_lane__2(c_2#67)))).0,)))*{c_1#81 <- `c_1*`, c_2#67 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#98)*{c#98 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#82*{c_1#82 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#68*{c_2#68 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#96*{c#96 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#83)), !($proj_lane__2(c_2#69)))).0,))*{c_1#83 <- `c_1*`, c_2#69 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#97)))*{c#97 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#84)), !($proj_lane__2(c_2#70)))).0,)))*{c_1#84 <- `c_1*`, c_2#70 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#101)*{c#101 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#85*{c_1#85 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#71*{c_2#71 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#99*{c#99 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#86)), !($proj_lane__2(c_2#72)))).0,))*{c_1#86 <- `c_1*`, c_2#72 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#100)))*{c#100 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#87)), !($proj_lane__2(c_2#73)))).0,)))*{c_1#87 <- `c_1*`, c_2#73 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : u32, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#104)*{c#104 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#88*{c_1#88 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#74*{c_2#74 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#102*{c#102 <- `c*`} = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#89)), !($proj_lane__2(c_2#75)))).0,))*{c_1#89 <- `c_1*`, c_2#75 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#103)))*{c#103 <- `c*`} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#90)), !($proj_lane__2(c_2#76)))).0,)))*{c_1#90 <- `c_1*`, c_2#76 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(shape : shape, def $f_(N : N, fN : fN, fN : fN) : u32, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(Inn), M), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#107).0,)))*{c#107 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#91*{c_1#91 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#77*{c_2#77 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), v_2) + -- let{`c*` : iN*} c#105*{c#105 <- `c*`} = $extend__(1, $sizenn($numtype_Fnn(F32_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#92)))), !($proj_num__1(!($proj_lane__0(c_2#78)))))).0,))*{c_1#92 <- `c_1*`, c_2#78 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F32_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(Inn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(Inn), M)), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#106).0,)))))*{c#106 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#93)))), !($proj_num__1(!($proj_lane__0(c_2#79)))))).0,)))*{c_1#93 <- `c_1*`, c_2#79 <- `c_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{M : dim, def $f_(N : N, fN : fN, fN : fN) : u32, v_1 : uN, v_2 : uN, Inn : addrtype}(`%X%`_shape(F64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(Inn), M), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#110).0,)))*{c#110 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#94*{c_1#94 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#80*{c_2#80 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), v_2) + -- let{`c*` : iN*} c#108*{c#108 <- `c*`} = $extend__(1, $sizenn($numtype_Fnn(F64_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#95)))), !($proj_num__1(!($proj_lane__0(c_2#81)))))).0,))*{c_1#95 <- `c_1*`, c_2#81 <- `c_2*`} + -- if ($isize(Inn) = $fsize(F64_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(Inn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(Inn), M)), mk_lane__0_lane_($numtype_addrtype(Inn), mk_num__0_num_(Inn, `%`_uN($proj_uN_0(c#109).0,)))))*{c#109 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#96)))), !($proj_num__1(!($proj_lane__0(c_2#82)))))).0,)))*{c_1#96 <- `c_1*`, c_2#82 <- `c_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(shape : shape, def $f_(N : N, iN : iN, iN : iN) : iN, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#113)*{c#113 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#97*{c_1#97 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#111*{c#111 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#98)), `%`_iN($proj_uN_0(i).0,))*{c_1#98 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#112)))*{c#112 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#116)*{c#116 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#99*{c_1#99 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#114*{c#114 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#100)), `%`_iN($proj_uN_0(i).0,))*{c_1#100 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#115)))*{c#115 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#119)*{c#119 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#101*{c_1#101 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#117*{c#117 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#102)), `%`_iN($proj_uN_0(i).0,))*{c_1#102 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#118)))*{c#118 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{M : dim, def $f_(N : N, iN : iN, iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#122)*{c#122 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#103*{c_1#103 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#120*{c#120 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#104)), `%`_iN($proj_uN_0(i).0,))*{c_1#104 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#121)))*{c#121 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(shape : shape, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#125)*{c#125 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#105*{c_1#105 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c*` : iN*} c#123*{c#123 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#106)), `%`_iN($proj_uN_0(i).0,))*{c_1#106 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#124)))*{c#124 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#128)*{c#128 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#107*{c_1#107 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c*` : iN*} c#126*{c#126 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#108)), `%`_iN($proj_uN_0(i).0,))*{c_1#108 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#127)))*{c#127 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#131)*{c#131 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#109*{c_1#109 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c*` : iN*} c#129*{c#129 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#110)), `%`_iN($proj_uN_0(i).0,))*{c_1#110 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#130)))*{c#130 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{M : dim, def $f_(N : N, sx : sx, iN : iN, iN : iN) : iN, sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, M), def $f_, sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#134)*{c#134 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#111*{c_1#111 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c*` : iN*} c#132*{c#132 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#112)), `%`_iN($proj_uN_0(i).0,))*{c_1#112 <- `c_1*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#133)))*{c#133 <- `c*`} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(shape : shape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I32_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#113*{c_1#113 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#114)), `%`_iN(0,))).0,)*{c_1#114 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#115)), `%`_iN(0,))).0,),))*{c_1#115 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I64_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#116*{c_1#116 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#117)), `%`_iN(0,))).0,)*{c_1#117 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#118)), `%`_iN(0,))).0,),))*{c_1#118 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I8_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#119*{c_1#119 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#120)), `%`_iN(0,))).0,)*{c_1#120 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#121)), `%`_iN(0,))).0,),))*{c_1#121 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{M : dim, v_1 : uN, c : uN}(`%X%`_shape(I16_lanetype, M), v_1) = $irev_(32, c) + -- let{`c_1*` : lane_*} c_1#122*{c_1#122 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#123)), `%`_iN(0,))).0,)*{c_1#123 <- `c_1*`} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#124)), `%`_iN(0,))).0,),))*{c_1#124 <- `c_1*`} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(shape : shape, def $f_(N : N, iN*, iN : iN) : iN, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), mk_lane__2_lane_(I32_Jnn, c#137)*{c#137 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#125*{c_1#125 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#83*{c_2#83 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : iN*} c#135*{c#135 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#126))*{c_1#126 <- `c_1*`}, !($proj_lane__2(c_2#84)))*{c_2#84 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M)), mk_lane__2_lane_(I32_Jnn, c#136)))*{c#136 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), mk_lane__2_lane_(I64_Jnn, c#140)*{c#140 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#127*{c_1#127 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#85*{c_2#85 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : iN*} c#138*{c#138 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#128))*{c_1#128 <- `c_1*`}, !($proj_lane__2(c_2#86)))*{c_2#86 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M)), mk_lane__2_lane_(I64_Jnn, c#139)))*{c#139 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), mk_lane__2_lane_(I8_Jnn, c#143)*{c#143 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#129*{c_1#129 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#87*{c_2#87 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : iN*} c#141*{c#141 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#130))*{c_1#130 <- `c_1*`}, !($proj_lane__2(c_2#88)))*{c_2#88 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M)), mk_lane__2_lane_(I8_Jnn, c#142)))*{c#142 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{M : dim, def $f_(N : N, iN*, iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), mk_lane__2_lane_(I16_Jnn, c#146)*{c#146 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#131*{c_1#131 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#89*{c_2#89 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : iN*} c#144*{c#144 <- `c*`} = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#132))*{c_1#132 <- `c_1*`}, !($proj_lane__2(c_2#90)))*{c_2#90 <- `c_2*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M)), mk_lane__2_lane_(I16_Jnn, c#145)))*{c#145 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), i#93310*{i#93310 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), c#148*{c#148 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#133*{c_1#133 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#91*{c_2#91 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v_2) + -- let{`c*` : lane_*} c#147*{c#147 <- `c*`} = c_1#134*{c_1#134 <- `c_1*`} ++ c_2#92*{c_2#92 <- `c_2*`}[$proj_uN_0(i#93311).0]*{i#93311 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), i#93313*{i#93313 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), c#150*{c#150 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#135*{c_1#135 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#93*{c_2#93 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v_2) + -- let{`c*` : lane_*} c#149*{c#149 <- `c*`} = c_1#136*{c_1#136 <- `c_1*`} ++ c_2#94*{c_2#94 <- `c_2*`}[$proj_uN_0(i#93314).0]*{i#93314 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), i#93316*{i#93316 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), c#152*{c#152 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#137*{c_1#137 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#95*{c_2#95 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v_2) + -- let{`c*` : lane_*} c#151*{c#151 <- `c*`} = c_1#138*{c_1#138 <- `c_1*`} ++ c_2#96*{c_2#96 <- `c_2*`}[$proj_uN_0(i#93317).0]*{i#93317 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), i#93319*{i#93319 <- `i*`}, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), c#154*{c#154 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#139*{c_1#139 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_1) + -- let{`c_2*` : lane_*} c_2#97*{c_2#97 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v_2) + -- let{`c*` : lane_*} c#153*{c#153 <- `c*`} = c_1#140*{c_1#140 <- `c_1*`} ++ c_2#98*{c_2#98 <- `c_2*`}[$proj_uN_0(i#93320).0]*{i#93320 <- `i*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{Vnn : vectype, v : uN}(Vnn, NOT_vvunop, v) = [$inot_($vsizenn(Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(vectype : vectype, vvbinop : vvbinop, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{Vnn : vectype, v_1 : uN, v_2 : uN}(Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(vectype : vectype, vvternop : vvternop, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vunop_(shape : shape, vunop_ : vunop_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F32_lanetype, M), mk_vunop__1_vunop_(F32_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(F64_lanetype, M), mk_vunop__1_vunop_(F64_Fnn, M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I32_lanetype, M), mk_vunop__0_vunop_(I32_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I64_lanetype, M), mk_vunop__0_vunop_(I64_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I8_lanetype, M), mk_vunop__0_vunop_(I8_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vunop_{M : dim, v : uN}(`%X%`_shape(I16_lanetype, M), mk_vunop__0_vunop_(I16_Jnn, M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbinop_(shape : shape, vbinop_ : vbinop_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, ADD_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iadd_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, SUB_SAT_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $isub_sat_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MIN_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imin_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, MAX_vbinop_Jnn_M(sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $imax_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vbinop__0_vbinop_(I32_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vbinop__0_vbinop_(I64_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vbinop__0_vbinop_(I8_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vbinop__0_vbinop_(I16_Jnn, M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vbinop__1_vbinop_(F32_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbinop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vbinop__1_vbinop_(F64_Fnn, M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vternop_(shape : shape, vternop_ : vternop_, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, M), mk_vternop__0_vternop_(I32_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, M), mk_vternop__0_vternop_(I64_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, M), mk_vternop__0_vternop_(I8_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, M), mk_vternop__0_vternop_(I16_Jnn, M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, M), mk_vternop__1_vternop_(F32_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vternop_{M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, M), mk_vternop__1_vternop_(F64_Fnn, M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vrelop_(shape : shape, vrelop_ : vrelop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ilt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GT_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $igt_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, LE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ile_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M), mk_vrelop__0_vrelop_(I32_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M), mk_vrelop__0_vrelop_(I64_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M), mk_vrelop__0_vrelop_(I8_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M), mk_vrelop__0_vrelop_(I16_Jnn, M, GE_vrelop_Jnn_M(sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ige_, sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, M), mk_vrelop__1_vrelop_(F32_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vrelop_{M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, M), mk_vrelop__1_vrelop_(F64_Fnn, M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half : half, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2857?{half#2857 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2859?{half#2859 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2861?{half#2861 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2863?{half#2863 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2865?{half#2865 <- `half?`}, sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2867?{half#2867 <- `half?`}, sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2869?{half#2869 <- `half?`}, sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, `half?` : half?, sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half#2871?{half#2871 <- `half?`}, sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), sx, c_1) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2833?{zero#2833 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#157))?{c#157 <- `c?`}) + -- let{`c?` : iN?} c#155?{c#155 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#156))))?{c#156 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2835?{zero#2835 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#160))?{c#160 <- `c?`}) + -- let{`c?` : iN?} c#158?{c#158 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#159))))?{c#159 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2837?{zero#2837 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#163))?{c#163 <- `c?`}) + -- let{`c?` : iN?} c#161?{c#161 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#162))))?{c#162 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2839?{zero#2839 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#166))?{c#166 <- `c?`}) + -- let{`c?` : iN?} c#164?{c#164 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#165))))?{c#165 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2841?{zero#2841 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#169))?{c#169 <- `c?`}) + -- let{`c?` : iN?} c#167?{c#167 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#168))))?{c#168 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2843?{zero#2843 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#172))?{c#172 <- `c?`}) + -- let{`c?` : iN?} c#170?{c#170 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#171))))?{c#171 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2845?{zero#2845 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#175))?{c#175 <- `c?`}) + -- let{`c?` : iN?} c#173?{c#173 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#174))))?{c#174 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2847?{zero#2847 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#178))?{c#178 <- `c?`}) + -- let{`c?` : iN?} c#176?{c#176 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#177))))?{c#177 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2849?{zero#2849 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#181))?{c#181 <- `c?`}) + -- let{`c?` : iN?} c#179?{c#179 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#180))))?{c#180 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2851?{zero#2851 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#184))?{c#184 <- `c?`}) + -- let{`c?` : iN?} c#182?{c#182 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#183))))?{c#183 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2853?{zero#2853 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#187))?{c#187 <- `c?`}) + -- let{`c?` : iN?} c#185?{c#185 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#186))))?{c#186 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2855?{zero#2855 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#190))?{c#190 <- `c?`}) + -- let{`c?` : iN?} c#188?{c#188 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#189))))?{c#189 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2857?{zero#2857 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#193))?{c#193 <- `c?`}) + -- let{`c?` : iN?} c#191?{c#191 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#192))))?{c#192 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2859?{zero#2859 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#196))?{c#196 <- `c?`}) + -- let{`c?` : iN?} c#194?{c#194 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#195))))?{c#195 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2861?{zero#2861 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#199))?{c#199 <- `c?`}) + -- let{`c?` : iN?} c#197?{c#197 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#198))))?{c#198 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2863?{zero#2863 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#202))?{c#202 <- `c?`}) + -- let{`c?` : iN?} c#200?{c#200 <- `c?`} = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#201))))?{c#201 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2865?{zero#2865 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#205))?{c#205 <- `c?`}) + -- let{`c?` : iN?} c#203?{c#203 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#204))))?{c#204 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2867?{zero#2867 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#208))?{c#208 <- `c?`}) + -- let{`c?` : iN?} c#206?{c#206 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#207))))?{c#207 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2869?{zero#2869 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#211))?{c#211 <- `c?`}) + -- let{`c?` : iN?} c#209?{c#209 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#210))))?{c#210 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2871?{zero#2871 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#214))?{c#214 <- `c?`}) + -- let{`c?` : iN?} c#212?{c#212 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#213))))?{c#213 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2873?{zero#2873 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#217))?{c#217 <- `c?`}) + -- let{`c?` : iN?} c#215?{c#215 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#216))))?{c#216 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2875?{zero#2875 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#220))?{c#220 <- `c?`}) + -- let{`c?` : iN?} c#218?{c#218 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#219))))?{c#219 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2877?{zero#2877 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#223))?{c#223 <- `c?`}) + -- let{`c?` : iN?} c#221?{c#221 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#222))))?{c#222 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2879?{zero#2879 <- `zero?`})), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#226))?{c#226 <- `c?`}) + -- let{`c?` : iN?} c#224?{c#224 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#225))))?{c#225 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2881?{zero#2881 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#229))?{c#229 <- `c?`}) + -- let{`c?` : iN?} c#227?{c#227 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#228))))?{c#228 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2883?{zero#2883 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#232))?{c#232 <- `c?`}) + -- let{`c?` : iN?} c#230?{c#230 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#231))))?{c#231 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2885?{zero#2885 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#235))?{c#235 <- `c?`}) + -- let{`c?` : iN?} c#233?{c#233 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#234))))?{c#234 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2887?{zero#2887 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#238))?{c#238 <- `c?`}) + -- let{`c?` : iN?} c#236?{c#236 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#237))))?{c#237 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2889?{zero#2889 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#241))?{c#241 <- `c?`}) + -- let{`c?` : iN?} c#239?{c#239 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#240))))?{c#240 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2891?{zero#2891 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#244))?{c#244 <- `c?`}) + -- let{`c?` : iN?} c#242?{c#242 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#243))))?{c#243 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2893?{zero#2893 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#247))?{c#247 <- `c?`}) + -- let{`c?` : iN?} c#245?{c#245 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#246))))?{c#246 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, sx : sx, `zero?` : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(sx, zero#2895?{zero#2895 <- `zero?`})), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#250))?{c#250 <- `c?`}) + -- let{`c?` : iN?} c#248?{c#248 <- `c?`} = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), sx, c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#249))))?{c#249 <- `c?`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#253))*{c#253 <- `c*`} + -- let{`c*` : fN*} c#251*{c#251 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#252))))*{c#252 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#256))*{c#256 <- `c*`} + -- let{`c*` : fN*} c#254*{c#254 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#255))))*{c#255 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#259))*{c#259 <- `c*`} + -- let{`c*` : fN*} c#257*{c#257 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#258))))*{c#258 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#262))*{c#262 <- `c*`} + -- let{`c*` : fN*} c#260*{c#260 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#261))))*{c#261 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#265))*{c#265 <- `c*`} + -- let{`c*` : fN*} c#263*{c#263 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#264))))*{c#264 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#268))*{c#268 <- `c*`} + -- let{`c*` : fN*} c#266*{c#266 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#267))))*{c#267 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#271))*{c#271 <- `c*`} + -- let{`c*` : fN*} c#269*{c#269 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#270))))*{c#270 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#274))*{c#274 <- `c*`} + -- let{`c*` : fN*} c#272*{c#272 <- `c*`} = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#273))))*{c#273 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#277))*{c#277 <- `c*`} + -- let{`c*` : fN*} c#275*{c#275 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#276))))*{c#276 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#280))*{c#280 <- `c*`} + -- let{`c*` : fN*} c#278*{c#278 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#279))))*{c#279 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#283))*{c#283 <- `c*`} + -- let{`c*` : fN*} c#281*{c#281 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#282))))*{c#282 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#286))*{c#286 <- `c*`} + -- let{`c*` : fN*} c#284*{c#284 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#285))))*{c#285 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#289))*{c#289 <- `c*`} + -- let{`c*` : fN*} c#287*{c#287 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#288))))*{c#288 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#292))*{c#292 <- `c*`} + -- let{`c*` : fN*} c#290*{c#290 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#291))))*{c#291 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#295))*{c#295 <- `c*`} + -- let{`c*` : fN*} c#293*{c#293 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#294))))*{c#294 <- `c*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#298))*{c#298 <- `c*`} + -- let{`c*` : fN*} c#296*{c#296 <- `c*`} = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#297))))*{c#297 <- `c*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vcvtop__(shape_1 : shape, shape_2 : shape, vcvtop__ : vcvtop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop) = ?())) + -- let{`c_1*` : lane_*} c_1#141*{c_1#141 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M), v_1) + -- let{`c**` : lane_**} c#299*{c#299 <- `c*#43`}*{`c*#43` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M), `%X%`_shape(Lnn_2, M), vcvtop, c_1#142)*{c_1#142 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M), c#300*{c#300 <- `c*#44`})*{`c*#44` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(half)) + -- let{`c_1*` : lane_*} c_1#143*{c_1#143 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$half(half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{`c**` : lane_**} c#301*{c#301 <- `c*#45`}*{`c*#45` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#144)*{c_1#144 <- `c_1*`}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#302*{c#302 <- `c*#46`})*{`c*#46` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{`c_1*` : lane_*} c_1#145*{c_1#145 <- `c_1*`} = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{`c**` : lane_**} c#303*{c#303 <- `c*#47`}*{`c*#47` <- `c**`} = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#146)*{c_1#146 <- `c_1*`} ++ [$zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c#304*{c#304 <- `c*#48`})*{`c*#48` <- `c**`}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_, vec_ : vec_, u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), mk_vshiftop__0_vshiftop_(I32_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), mk_vshiftop__0_vshiftop_(I64_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), mk_vshiftop__0_vshiftop_(I8_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshiftop_{M : dim, sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), mk_vshiftop__0_vshiftop_(I16_Jnn, M, SHR_vshiftop_Jnn_M(sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), def $ishr_, sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(ishape : ishape, vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{M : dim, v : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vswizzlop_(bshape : bshape, vswizzlop_ : vswizzlop_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vswizzlop_{M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), mk_vswizzlop__0_vswizzlop_(M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{M : dim, `i*` : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, M),), i#93357*{i#93357 <- `i*`}, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, M), i*{i <- `i*`}, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, sx : sx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#147*{c_1#147 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#99*{c_2#99 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#1*{c'_1#1 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#148)))*{c_1#148 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#1*{c'_2#1 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#100)))*{c_2#100 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#2)*{c'_1#2 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#2)*{c'_2#2 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#3)))*{c'_1#3 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#3)))*{c'_2#3 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#149*{c_1#149 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#101*{c_2#101 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#4*{c'_1#4 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#150)))*{c_1#150 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#4*{c'_2#4 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#102)))*{c_2#102 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#5)*{c'_1#5 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#5)*{c'_2#5 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#6)))*{c'_1#6 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#6)))*{c'_2#6 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#151*{c_1#151 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#103*{c_2#103 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#7*{c'_1#7 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#152)))*{c_1#152 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#7*{c'_2#7 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#104)))*{c_2#104 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#8)*{c'_1#8 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#8)*{c'_2#8 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#9)))*{c'_1#9 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#9)))*{c'_2#9 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#153*{c_1#153 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#105*{c_2#105 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#10*{c'_1#10 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#154)))*{c_1#154 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#10*{c'_2#10 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_2#106)))*{c_2#106 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#11)*{c'_1#11 <- `c'_1*`} ++ mk_lane__2_lane_(I32_Jnn, c'_2#11)*{c'_2#11 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#12)))*{c'_1#12 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#12)))*{c'_2#12 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#155*{c_1#155 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#107*{c_2#107 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#13*{c'_1#13 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#156)))*{c_1#156 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#13*{c'_2#13 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#108)))*{c_2#108 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#14)*{c'_1#14 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#14)*{c'_2#14 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#15)))*{c'_1#15 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#15)))*{c'_2#15 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#157*{c_1#157 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#109*{c_2#109 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#16*{c'_1#16 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#158)))*{c_1#158 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#16*{c'_2#16 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#110)))*{c_2#110 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#17)*{c'_1#17 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#17)*{c'_2#17 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#18)))*{c'_1#18 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#18)))*{c'_2#18 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#159*{c_1#159 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#111*{c_2#111 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#19*{c'_1#19 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#160)))*{c_1#160 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#19*{c'_2#19 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#112)))*{c_2#112 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#20)*{c'_1#20 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#20)*{c'_2#20 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#21)))*{c'_1#21 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#21)))*{c'_2#21 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#161*{c_1#161 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#113*{c_2#113 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#22*{c'_1#22 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#162)))*{c_1#162 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#22*{c'_2#22 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_2#114)))*{c_2#114 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#23)*{c'_1#23 <- `c'_1*`} ++ mk_lane__2_lane_(I64_Jnn, c'_2#23)*{c'_2#23 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#24)))*{c'_1#24 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#24)))*{c'_2#24 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#163*{c_1#163 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#115*{c_2#115 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#25*{c'_1#25 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#164)))*{c_1#164 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#25*{c'_2#25 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#116)))*{c_2#116 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#26)*{c'_1#26 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#26)*{c'_2#26 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#27)))*{c'_1#27 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#27)))*{c'_2#27 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#165*{c_1#165 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#117*{c_2#117 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#28*{c'_1#28 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#166)))*{c_1#166 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#28*{c'_2#28 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#118)))*{c_2#118 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#29)*{c'_1#29 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#29)*{c'_2#29 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#30)))*{c'_1#30 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#30)))*{c'_2#30 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#167*{c_1#167 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#119*{c_2#119 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#31*{c'_1#31 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#168)))*{c_1#168 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#31*{c'_2#31 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#120)))*{c_2#120 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#32)*{c'_1#32 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#32)*{c'_2#32 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#33)))*{c'_1#33 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#33)))*{c'_2#33 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#169*{c_1#169 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#121*{c_2#121 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#34*{c'_1#34 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#170)))*{c_1#170 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#34*{c'_2#34 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_2#122)))*{c_2#122 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#35)*{c'_1#35 <- `c'_1*`} ++ mk_lane__2_lane_(I8_Jnn, c'_2#35)*{c'_2#35 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#36)))*{c'_1#36 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#36)))*{c'_2#36 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#171*{c_1#171 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#123*{c_2#123 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#37*{c'_1#37 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#172)))*{c_1#172 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#37*{c'_2#37 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#124)))*{c_2#124 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#38)*{c'_1#38 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#38)*{c'_2#38 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#39)))*{c'_1#39 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#39)))*{c'_2#39 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#173*{c_1#173 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#125*{c_2#125 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#40*{c'_1#40 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#174)))*{c_1#174 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#40*{c'_2#40 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#126)))*{c_2#126 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#41)*{c'_1#41 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#41)*{c'_2#41 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#42)))*{c'_1#42 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#42)))*{c'_2#42 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#175*{c_1#175 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#127*{c_2#127 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#43*{c'_1#43 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#176)))*{c_1#176 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#43*{c'_2#43 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#128)))*{c_2#128 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#44)*{c'_1#44 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#44)*{c'_2#44 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#45)))*{c'_1#45 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#45)))*{c'_2#45 <- `c'_2*`} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), sx, v_1, v_2) = v + -- let{`c_1*` : lane_*} c_1#177*{c_1#177 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c_2*` : lane_*} c_2#129*{c_2#129 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{`c'_1*` : iN*} c'_1#46*{c'_1#46 <- `c'_1*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#178)))*{c_1#178 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#46*{c'_2#46 <- `c'_2*`} = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_2#130)))*{c_2#130 <- `c_2*`} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#47)*{c'_1#47 <- `c'_1*`} ++ mk_lane__2_lane_(I16_Jnn, c'_2#47)*{c'_2#47 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#48)))*{c'_1#48 <- `c'_1*`} + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#48)))*{c'_2#48 <- `c'_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(N : N, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{N : nat, `i*` : iN*, `j_1*` : N*, `j_2*` : N*}(N, i#93358*{i#93358 <- `i*`}) = $iadd_(N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax N, [j_1#1 j_2#1]*{j_1#1 <- `j_1*`, j_2#1 <- `j_2*`}) = $proj_uN_0(i#93359).0*{i#93359 <- `i*`}) + -- (wf_uN: `%%`(N, `%`_uN(j_1#2,)))*{j_1#2 <- `j_1*`} + -- (wf_uN: `%%`(N, `%`_uN(j_2#2,)))*{j_2#2 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*) : iN*, sx : sx, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#307)*{c#307 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#179*{c_1#179 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#49*{c'_1#49 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#180)))*{c_1#180 <- `c_1*`} + -- let{`c*` : iN*} c#305*{c#305 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#50*{c'_1#50 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#306)))*{c#306 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#310)*{c#310 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#181*{c_1#181 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#51*{c'_1#51 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#182)))*{c_1#182 <- `c_1*`} + -- let{`c*` : iN*} c#308*{c#308 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#52*{c'_1#52 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#309)))*{c#309 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#313)*{c#313 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#183*{c_1#183 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#53*{c'_1#53 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#184)))*{c_1#184 <- `c_1*`} + -- let{`c*` : iN*} c#311*{c#311 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#54*{c'_1#54 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#312)))*{c#312 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#316)*{c#316 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#185*{c_1#185 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#55*{c'_1#55 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx, !($proj_lane__2(c_1#186)))*{c_1#186 <- `c_1*`} + -- let{`c*` : iN*} c#314*{c#314 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#56*{c'_1#56 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#315)))*{c#315 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#319)*{c#319 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#187*{c_1#187 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#57*{c'_1#57 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#188)))*{c_1#188 <- `c_1*`} + -- let{`c*` : iN*} c#317*{c#317 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#58*{c'_1#58 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#318)))*{c#318 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#322)*{c#322 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#189*{c_1#189 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#59*{c'_1#59 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#190)))*{c_1#190 <- `c_1*`} + -- let{`c*` : iN*} c#320*{c#320 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#60*{c'_1#60 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#321)))*{c#321 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#325)*{c#325 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#191*{c_1#191 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#61*{c'_1#61 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#192)))*{c_1#192 <- `c_1*`} + -- let{`c*` : iN*} c#323*{c#323 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#62*{c'_1#62 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#324)))*{c#324 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#328)*{c#328 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#193*{c_1#193 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#63*{c'_1#63 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx, !($proj_lane__2(c_1#194)))*{c_1#194 <- `c_1*`} + -- let{`c*` : iN*} c#326*{c#326 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#64*{c'_1#64 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#327)))*{c#327 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#331)*{c#331 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#195*{c_1#195 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#65*{c'_1#65 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#196)))*{c_1#196 <- `c_1*`} + -- let{`c*` : iN*} c#329*{c#329 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#66*{c'_1#66 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#330)))*{c#330 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#334)*{c#334 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#197*{c_1#197 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#67*{c'_1#67 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#198)))*{c_1#198 <- `c_1*`} + -- let{`c*` : iN*} c#332*{c#332 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#68*{c'_1#68 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#333)))*{c#333 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#337)*{c#337 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#199*{c_1#199 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#69*{c'_1#69 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#200)))*{c_1#200 <- `c_1*`} + -- let{`c*` : iN*} c#335*{c#335 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#70*{c'_1#70 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#336)))*{c#336 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#340)*{c#340 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#201*{c_1#201 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#71*{c'_1#71 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx, !($proj_lane__2(c_1#202)))*{c_1#202 <- `c_1*`} + -- let{`c*` : iN*} c#338*{c#338 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#72*{c'_1#72 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#339)))*{c#339 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#343)*{c#343 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#203*{c_1#203 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#73*{c'_1#73 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#204)))*{c_1#204 <- `c_1*`} + -- let{`c*` : iN*} c#341*{c#341 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#74*{c'_1#74 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#342)))*{c#342 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#346)*{c#346 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#205*{c_1#205 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#75*{c'_1#75 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#206)))*{c_1#206 <- `c_1*`} + -- let{`c*` : iN*} c#344*{c#344 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#76*{c'_1#76 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#345)))*{c#345 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#349)*{c#349 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#207*{c_1#207 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#77*{c'_1#77 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#208)))*{c_1#208 <- `c_1*`} + -- let{`c*` : iN*} c#347*{c#347 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#78*{c'_1#78 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#348)))*{c#348 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*) : iN*, sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#352)*{c#352 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#209*{c_1#209 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{`c'_1*` : iN*} c'_1#79*{c'_1#79 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx, !($proj_lane__2(c_1#210)))*{c_1#210 <- `c_1*`} + -- let{`c*` : iN*} c#350*{c#350 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#80*{c'_1#80 <- `c'_1*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#351)))*{c#351 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextunop__(ishape_1 : ishape, ishape_2 : ishape, vextunop__ : vextunop__, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextunop__{M_1 : dim, M_2 : dim, sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#1*{i_1#1 <- `i_1*`}, i_2#1*{i_2#1 <- `i_2*`}) = $iadd_(N, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#3 j_2#3]*{j_1#3 <- `j_1*`, j_2#3 <- `j_2*`}) = $imul_(N, i_1#2, i_2#2)*{i_1#2 <- `i_1*`, i_2#2 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#4))*{j_1#4 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#4))*{j_2#4 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(N : N, iN*, iN*) : iN*, sx : sx, sx : sx, laneidx : laneidx, laneidx : laneidx, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#355)*{c#355 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#211*{c_1#211 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#131*{c_2#131 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#81*{c'_1#81 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#212)))*{c_1#212 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#49*{c'_2#49 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#132)))*{c_2#132 <- `c_2*`} + -- let{`c*` : iN*} c#353*{c#353 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#82*{c'_1#82 <- `c'_1*`}, c'_2#50*{c'_2#50 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#354)))*{c#354 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#358)*{c#358 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#213*{c_1#213 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#133*{c_2#133 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#83*{c'_1#83 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#214)))*{c_1#214 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#51*{c'_2#51 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#134)))*{c_2#134 <- `c_2*`} + -- let{`c*` : iN*} c#356*{c#356 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#84*{c'_1#84 <- `c'_1*`}, c'_2#52*{c'_2#52 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#357)))*{c#357 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#361)*{c#361 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#215*{c_1#215 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#135*{c_2#135 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#85*{c'_1#85 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#216)))*{c_1#216 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#53*{c'_2#53 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#136)))*{c_2#136 <- `c_2*`} + -- let{`c*` : iN*} c#359*{c#359 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#86*{c'_1#86 <- `c'_1*`}, c'_2#54*{c'_2#54 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#360)))*{c#360 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#364)*{c#364 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#217*{c_1#217 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#137*{c_2#137 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#87*{c'_1#87 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#218)))*{c_1#218 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#55*{c'_2#55 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#138)))*{c_2#138 <- `c_2*`} + -- let{`c*` : iN*} c#362*{c#362 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1#88*{c'_1#88 <- `c'_1*`}, c'_2#56*{c'_2#56 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#363)))*{c#363 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#367)*{c#367 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#219*{c_1#219 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#139*{c_2#139 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#89*{c'_1#89 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#220)))*{c_1#220 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#57*{c'_2#57 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#140)))*{c_2#140 <- `c_2*`} + -- let{`c*` : iN*} c#365*{c#365 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#90*{c'_1#90 <- `c'_1*`}, c'_2#58*{c'_2#58 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#366)))*{c#366 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#370)*{c#370 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#221*{c_1#221 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#141*{c_2#141 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#91*{c'_1#91 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#222)))*{c_1#222 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#59*{c'_2#59 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#142)))*{c_2#142 <- `c_2*`} + -- let{`c*` : iN*} c#368*{c#368 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#92*{c'_1#92 <- `c'_1*`}, c'_2#60*{c'_2#60 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#369)))*{c#369 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#373)*{c#373 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#223*{c_1#223 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#143*{c_2#143 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#93*{c'_1#93 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#224)))*{c_1#224 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#61*{c'_2#61 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#144)))*{c_2#144 <- `c_2*`} + -- let{`c*` : iN*} c#371*{c#371 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#94*{c'_1#94 <- `c'_1*`}, c'_2#62*{c'_2#62 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#372)))*{c#372 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#376)*{c#376 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#225*{c_1#225 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#145*{c_2#145 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#95*{c'_1#95 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#226)))*{c_1#226 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#63*{c'_2#63 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#146)))*{c_2#146 <- `c_2*`} + -- let{`c*` : iN*} c#374*{c#374 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1#96*{c'_1#96 <- `c'_1*`}, c'_2#64*{c'_2#64 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#375)))*{c#375 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#379)*{c#379 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#227*{c_1#227 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#147*{c_2#147 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#97*{c'_1#97 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#228)))*{c_1#228 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#65*{c'_2#65 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#148)))*{c_2#148 <- `c_2*`} + -- let{`c*` : iN*} c#377*{c#377 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#98*{c'_1#98 <- `c'_1*`}, c'_2#66*{c'_2#66 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#378)))*{c#378 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#382)*{c#382 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#229*{c_1#229 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#149*{c_2#149 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#99*{c'_1#99 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#230)))*{c_1#230 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#67*{c'_2#67 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#150)))*{c_2#150 <- `c_2*`} + -- let{`c*` : iN*} c#380*{c#380 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#100*{c'_1#100 <- `c'_1*`}, c'_2#68*{c'_2#68 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#381)))*{c#381 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#385)*{c#385 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#231*{c_1#231 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#151*{c_2#151 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#101*{c'_1#101 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#232)))*{c_1#232 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#69*{c'_2#69 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#152)))*{c_2#152 <- `c_2*`} + -- let{`c*` : iN*} c#383*{c#383 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#102*{c'_1#102 <- `c'_1*`}, c'_2#70*{c'_2#70 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#384)))*{c#384 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#388)*{c#388 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#233*{c_1#233 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#153*{c_2#153 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#103*{c'_1#103 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#234)))*{c_1#234 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#71*{c'_2#71 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#154)))*{c_2#154 <- `c_2*`} + -- let{`c*` : iN*} c#386*{c#386 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1#104*{c'_1#104 <- `c'_1*`}, c'_2#72*{c'_2#72 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#387)))*{c#387 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#391)*{c#391 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#235*{c_1#235 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#155*{c_2#155 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#105*{c'_1#105 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#236)))*{c_1#236 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#73*{c'_2#73 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#156)))*{c_2#156 <- `c_2*`} + -- let{`c*` : iN*} c#389*{c#389 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#106*{c'_1#106 <- `c'_1*`}, c'_2#74*{c'_2#74 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#390)))*{c#390 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#394)*{c#394 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#237*{c_1#237 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#157*{c_2#157 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#107*{c'_1#107 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#238)))*{c_1#238 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#75*{c'_2#75 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#158)))*{c_2#158 <- `c_2*`} + -- let{`c*` : iN*} c#392*{c#392 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#108*{c'_1#108 <- `c'_1*`}, c'_2#76*{c'_2#76 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#393)))*{c#393 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#397)*{c#397 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#239*{c_1#239 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#159*{c_2#159 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#109*{c'_1#109 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#240)))*{c_1#240 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#77*{c'_2#77 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#160)))*{c_2#160 <- `c_2*`} + -- let{`c*` : iN*} c#395*{c#395 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#110*{c'_1#110 <- `c'_1*`}, c'_2#78*{c'_2#78 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#396)))*{c#396 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#400)*{c#400 <- `c*`}) + -- let{`c_1*` : lane_*} c_1#241*{c_1#241 <- `c_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c_2*` : lane_*} c_2#161*{c_2#161 <- `c_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{`c'_1*` : iN*} c'_1#111*{c'_1#111 <- `c'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#242)))*{c_1#242 <- `c_1*`} + -- let{`c'_2*` : iN*} c'_2#79*{c'_2#79 <- `c'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#162)))*{c_2#162 <- `c_2*`} + -- let{`c*` : iN*} c#398*{c#398 <- `c*`} = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1#112*{c'_1#112 <- `c'_1*`}, c'_2#80*{c'_2#80 <- `c'_2*`}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#399)))*{c#399 <- `c*`} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#3*{i_1#3 <- `i_1*`}, i_2#3*{i_2#3 <- `i_2*`}) = $imul_(N, i_1, i_2)*{i_1 <- `i_1*`, i_2 <- `i_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{N : nat, `i_1*` : iN*, `i_2*` : iN*, `j_1*` : iN*, `j_2*` : iN*}(N, i_1#4*{i_1#4 <- `i_1*`}, i_2#4*{i_2#4 <- `i_2*`}) = $iadd_sat_(N, S_sx, j_1, j_2)*{j_1 <- `j_1*`, j_2 <- `j_2*`} + -- if ($concat_(syntax iN, [j_1#5 j_2#5]*{j_1#5 <- `j_1*`, j_2#5 <- `j_2*`}) = $imul_(N, i_1#5, i_2#5)*{i_1#5 <- `i_1*`, i_2#5 <- `i_2*`}) + -- (wf_uN: `%%`(N, j_1#6))*{j_1#6 <- `j_1*`} + -- (wf_uN: `%%`(N, j_2#6))*{j_2#6 <- `j_2*`} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(N : N, iN*, iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{N : nat, `i_1*` : iN*, `i_2*` : iN*}(N, i_1#6*{i_1#6 <- `i_1*`}, i_2#6*{i_2#6 <- `i_2*`}) = $relaxed2($R_idot, syntax iN*, $ivdot_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`}), $ivdot_sat_(N, i_1*{i_1 <- `i_1*`}, i_2*{i_2 <- `i_2*`})) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextbinop__(ishape_1 : ishape, ishape_2 : ishape, vextbinop__ : vextbinop__, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, half : half, sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(half, sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, sx, sx, `%`_laneidx($half(half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($half(half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vextternop__(ishape_1 : ishape, ishape_2 : ishape, vextternop__ : vextternop__, vec_ : vec_, vec_ : vec_, vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#1*{ci_1#1 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#1*{ci_2#1 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#1*{ci'_1#1 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#2)))*{ci_1#2 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#1*{ci'_2#1 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#2)))*{ci_2#2 <- `ci_2*`} + -- let{`ci*` : iN*} ci#1*{ci#1 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#2*{ci'_1#2 <- `ci'_1*`}, ci'_2#2*{ci'_2#2 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#1*{ci'#1 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#2)*{ci#2 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#125)*{iter_0#125 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#2*{ci'#2 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#126)))*{iter_0#126 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#3*{ci'#3 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#3*{ci_1#3 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#3*{ci_2#3 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#3*{ci'_1#3 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#4)))*{ci_1#4 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#3*{ci'_2#3 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#4)))*{ci_2#4 <- `ci_2*`} + -- let{`ci*` : iN*} ci#3*{ci#3 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#4*{ci'_1#4 <- `ci'_1*`}, ci'_2#4*{ci'_2#4 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#4*{ci'#4 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#4)*{ci#4 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#127)*{iter_0#127 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#5*{ci'#5 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#128)))*{iter_0#128 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#6*{ci'#6 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#5*{ci_1#5 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#5*{ci_2#5 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#5*{ci'_1#5 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#6)))*{ci_1#6 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#5*{ci'_2#5 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#6)))*{ci_2#6 <- `ci_2*`} + -- let{`ci*` : iN*} ci#5*{ci#5 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#6*{ci'_1#6 <- `ci'_1*`}, ci'_2#6*{ci'_2#6 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#7*{ci'#7 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#6)*{ci#6 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#129)*{iter_0#129 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#8*{ci'#8 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#130)))*{iter_0#130 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#9*{ci'#9 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#7*{ci_1#7 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#7*{ci_2#7 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#7*{ci'_1#7 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#8)))*{ci_1#8 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#7*{ci'_2#7 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#8)))*{ci_2#8 <- `ci_2*`} + -- let{`ci*` : iN*} ci#7*{ci#7 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#8*{ci'_1#8 <- `ci'_1*`}, ci'_2#8*{ci'_2#8 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#10*{ci'#10 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#8)*{ci#8 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#131)*{iter_0#131 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#11*{ci'#11 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#132)))*{iter_0#132 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'#12*{ci'#12 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#9*{ci_1#9 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#9*{ci_2#9 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#9*{ci'_1#9 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#10)))*{ci_1#10 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#9*{ci'_2#9 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#10)))*{ci_2#10 <- `ci_2*`} + -- let{`ci*` : iN*} ci#9*{ci#9 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#10*{ci'_1#10 <- `ci'_1*`}, ci'_2#10*{ci'_2#10 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#13*{ci'#13 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#10)*{ci#10 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#133)*{iter_0#133 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#14*{ci'#14 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#134)))*{iter_0#134 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#15*{ci'#15 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#11*{ci_1#11 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#11*{ci_2#11 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#11*{ci'_1#11 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#12)))*{ci_1#12 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#11*{ci'_2#11 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#12)))*{ci_2#12 <- `ci_2*`} + -- let{`ci*` : iN*} ci#11*{ci#11 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#12*{ci'_1#12 <- `ci'_1*`}, ci'_2#12*{ci'_2#12 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#16*{ci'#16 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#12)*{ci#12 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#135)*{iter_0#135 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#17*{ci'#17 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#136)))*{iter_0#136 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#18*{ci'#18 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#13*{ci_1#13 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#13*{ci_2#13 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#13*{ci'_1#13 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#14)))*{ci_1#14 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#13*{ci'_2#13 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#14)))*{ci_2#14 <- `ci_2*`} + -- let{`ci*` : iN*} ci#13*{ci#13 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#14*{ci'_1#14 <- `ci'_1*`}, ci'_2#14*{ci'_2#14 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#19*{ci'#19 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#14)*{ci#14 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#137)*{iter_0#137 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#20*{ci'#20 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#138)))*{iter_0#138 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#21*{ci'#21 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#15*{ci_1#15 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#15*{ci_2#15 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#15*{ci'_1#15 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#16)))*{ci_1#16 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#15*{ci'_2#15 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#16)))*{ci_2#16 <- `ci_2*`} + -- let{`ci*` : iN*} ci#15*{ci#15 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#16*{ci'_1#16 <- `ci'_1*`}, ci'_2#16*{ci'_2#16 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#22*{ci'#22 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#16)*{ci#16 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#139)*{iter_0#139 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#23*{ci'#23 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#140)))*{iter_0#140 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'#24*{ci'#24 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#17*{ci_1#17 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#17*{ci_2#17 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#17*{ci'_1#17 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#18)))*{ci_1#18 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#17*{ci'_2#17 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#18)))*{ci_2#18 <- `ci_2*`} + -- let{`ci*` : iN*} ci#17*{ci#17 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#18*{ci'_1#18 <- `ci'_1*`}, ci'_2#18*{ci'_2#18 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#25*{ci'#25 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#18)*{ci#18 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#141)*{iter_0#141 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#26*{ci'#26 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#142)))*{iter_0#142 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#27*{ci'#27 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#19*{ci_1#19 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#19*{ci_2#19 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#19*{ci'_1#19 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#20)))*{ci_1#20 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#19*{ci'_2#19 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#20)))*{ci_2#20 <- `ci_2*`} + -- let{`ci*` : iN*} ci#19*{ci#19 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#20*{ci'_1#20 <- `ci'_1*`}, ci'_2#20*{ci'_2#20 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#28*{ci'#28 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#20)*{ci#20 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#143)*{iter_0#143 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#29*{ci'#29 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#144)))*{iter_0#144 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#30*{ci'#30 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#21*{ci_1#21 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#21*{ci_2#21 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#21*{ci'_1#21 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#22)))*{ci_1#22 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#21*{ci'_2#21 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#22)))*{ci_2#22 <- `ci_2*`} + -- let{`ci*` : iN*} ci#21*{ci#21 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#22*{ci'_1#22 <- `ci'_1*`}, ci'_2#22*{ci'_2#22 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#31*{ci'#31 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#22)*{ci#22 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#145)*{iter_0#145 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#32*{ci'#32 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#146)))*{iter_0#146 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#33*{ci'#33 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#23*{ci_1#23 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#23*{ci_2#23 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#23*{ci'_1#23 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#24)))*{ci_1#24 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#23*{ci'_2#23 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#24)))*{ci_2#24 <- `ci_2*`} + -- let{`ci*` : iN*} ci#23*{ci#23 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#24*{ci'_1#24 <- `ci'_1*`}, ci'_2#24*{ci'_2#24 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#34*{ci'#34 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#24)*{ci#24 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#147)*{iter_0#147 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#35*{ci'#35 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#148)))*{iter_0#148 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'#36*{ci'#36 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#25*{ci_1#25 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#25*{ci_2#25 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#25*{ci'_1#25 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, S_sx, !($proj_lane__2(ci_1#26)))*{ci_1#26 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#25*{ci'_2#25 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#26)))*{ci_2#26 <- `ci_2*`} + -- let{`ci*` : iN*} ci#25*{ci#25 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#26*{ci'_1#26 <- `ci'_1*`}, ci'_2#26*{ci'_2#26 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#37*{ci'#37 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#26)*{ci#26 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#149)*{iter_0#149 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#38*{ci'#38 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#150)))*{iter_0#150 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#39*{ci'#39 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#27*{ci_1#27 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#27*{ci_2#27 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#27*{ci'_1#27 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, S_sx, !($proj_lane__2(ci_1#28)))*{ci_1#28 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#27*{ci'_2#27 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#28)))*{ci_2#28 <- `ci_2*`} + -- let{`ci*` : iN*} ci#27*{ci#27 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#28*{ci'_1#28 <- `ci'_1*`}, ci'_2#28*{ci'_2#28 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#40*{ci'#40 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#28)*{ci#28 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#151)*{iter_0#151 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#41*{ci'#41 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#152)))*{iter_0#152 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#42*{ci'#42 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#29*{ci_1#29 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#29*{ci_2#29 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#29*{ci'_1#29 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, S_sx, !($proj_lane__2(ci_1#30)))*{ci_1#30 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#29*{ci'_2#29 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#30)))*{ci_2#30 <- `ci_2*`} + -- let{`ci*` : iN*} ci#29*{ci#29 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#30*{ci'_1#30 <- `ci'_1*`}, ci'_2#30*{ci'_2#30 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#43*{ci'#43 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#30)*{ci#30 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#153)*{iter_0#153 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#44*{ci'#44 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#154)))*{iter_0#154 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#45*{ci'#45 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{N : N} N = $relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{`ci_1*` : lane_*} ci_1#31*{ci_1#31 <- `ci_1*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{`ci_2*` : lane_*} ci_2#31*{ci_2#31 <- `ci_2*`} = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{`ci'_1*` : iN*} ci'_1#31*{ci'_1#31 <- `ci'_1*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, S_sx, !($proj_lane__2(ci_1#32)))*{ci_1#32 <- `ci_1*`} + -- let{`ci'_2*` : iN*} ci'_2#31*{ci'_2#31 <- `ci'_2*`} = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), N, $relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#32)))*{ci_2#32 <- `ci_2*`} + -- let{`ci*` : iN*} ci#31*{ci#31 <- `ci*`} = $ivrelaxed_dot_(N, ci'_1#32*{ci'_1#32 <- `ci'_1*`}, ci'_2#32*{ci'_2#32 <- `ci'_2*`}) + -- let{`ci'*` : iN*} ci'#46*{ci'#46 <- `ci'*`} = $extend__(N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#32)*{ci#32 <- `ci*`} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#155)*{iter_0#155 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#47*{ci'#47 <- `ci'*`})}) + -- if (c <- $vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#156)))*{iter_0#156 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'#48*{ci'#48 <- `ci'*`})} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(numtype : numtype, num_) + +def $val_num(num) : val + def $val_num{x0 : numtype, x1 : num_}(CONST_num(x0, x1)) = CONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_num(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(vectype : vectype, vec_) + +def $val_vec(vec) : val + def $val_vec{x0 : vectype, x1 : vec_}(VCONST_vec(x0, x1)) = VCONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | _HOSTFUNC(text) + +def $funccode_func(func) : funccode + def $funccode_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_funccode(x0, x1, x2) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_funccode(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{packtype : packtype, var_0 : iN}: + `%`(PACK_packval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(numtype : numtype, num_) + | VCONST(vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(packtype : packtype, iN) + +def $fieldval_packval(packval) : fieldval + def $fieldval_packval{x0 : packtype, x1 : iN}(PACK_packval(x0, x1)) = PACK_fieldval(x0, x1) + +def $fieldval_ref(ref) : fieldval + def $fieldval_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_fieldval + def $fieldval_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_fieldval(x) + +def $fieldval_val(val) : fieldval + def $fieldval_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_fieldval(x0, x1) + def $fieldval_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_fieldval(x0, x1) + def $fieldval_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_fieldval + def $fieldval_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_fieldval(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(numtype, var_0),) + -- wf_num_: `%%`(numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(packtype, var_0),) + -- wf_uN: `%%`($psize(packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(store : store, frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{store : store, frame : frame}: + `%`(`%;%`_state(store, frame),) + -- wf_store: `%`(store,) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(state : state, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{state : state, `instr*` : instr*}: + `%`(`%;%`_config(state, `instr*`),) + -- wf_state: `%`(state,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(storagetype : storagetype, val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(BOT_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{`null?` : null?, heaptype : heaptype, val : val}(REF_storagetype(`null?`, heaptype), val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(V128_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F64_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(F32_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I64_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{val : val}(I32_storagetype, val) = ?($fieldval_val(val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I8_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i)),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I16_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(storagetype : storagetype, sx?, fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(BOT_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(V128_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(BOT_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(V128_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(BOT_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(V128_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(BOT_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(V128_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(BOT_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(V128_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(BOT_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(V128_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(BOT_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{`null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(V128_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(BOT_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(V128_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(BOT_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(V128_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(F32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I64_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{vectype : vectype, var_1 : vec_}(I32_storagetype, ?(), VCONST_fieldval(vectype, var_1)) = ?(VCONST_val(vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(BOT_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_, `null?` : null?, heaptype : heaptype}(REF_storagetype(`null?`, heaptype), ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(V128_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(F32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I64_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{numtype : numtype, var_0 : num_}(I32_storagetype, ?(), CONST_fieldval(numtype, var_0)) = ?(CONST_val(numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I8_storagetype, ?(sx), PACK_fieldval(I8_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, sx, i))),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{sx : sx, i : uN}(I16_storagetype, ?(sx), PACK_fieldval(I16_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, `xa*` : externaddr*}([TAG_externaddr(a)] ++ xa#1*{xa#1 <- `xa*`}) = [a] ++ $tagsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#2*{xa#2 <- `xa*`}) = $tagsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, `xa*` : externaddr*}([GLOBAL_externaddr(a)] ++ xa#3*{xa#3 <- `xa*`}) = [a] ++ $globalsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#4*{xa#4 <- `xa*`}) = $globalsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, `xa*` : externaddr*}([MEM_externaddr(a)] ++ xa#5*{xa#5 <- `xa*`}) = [a] ++ $memsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#6*{xa#6 <- `xa*`}) = $memsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, `xa*` : externaddr*}([TABLE_externaddr(a)] ++ xa#7*{xa#7 <- `xa*`}) = [a] ++ $tablesxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#8*{xa#8 <- `xa*`}) = $tablesxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, `xa*` : externaddr*}([FUNC_externaddr(a)] ++ xa#9*{xa#9 <- `xa*`}) = [a] ++ $funcsxa(xa*{xa <- `xa*`}) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{externaddr : externaddr, `xa*` : externaddr*}([externaddr] ++ xa#10*{xa#10 <- `xa*`}) = $funcsxa(xa*{xa <- `xa*`}) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $store(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $store{s : store, f : frame}(`%;%`_state(s, f)) = s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $frame(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $frame{s : store, f : frame}(`%;%`_state(s, f)) = f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $moduleinst(state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $funcinst(state : state, funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $structinst(state : state, structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $arrayinst(state : state, arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $exninst(state : state, exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $type(state : state, typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $tag(state : state, tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $global(state : state, globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $mem(state : state, memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $table(state : state, tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $func(state : state, funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $data(state : state, dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $elem(state : state, tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $local(state : state, localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(state : state, localidx : localidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(state : state, globalidx : globalidx, val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(state : state, tableidx : tableidx, nat : nat, ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(state : state, tableidx : tableidx, tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(state : state, memidx : memidx, nat : nat, nat : nat, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, `b*` : byte*}(z, x, i, j, b#1*{b#1 <- `b*`}) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b#2*{b#2 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(state : state, memidx : memidx, meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(state : state, elemidx : elemidx, ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, `r*` : ref*}(z, x, r#1*{r#1 <- `r*`}) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r*{r <- `r*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r#2*{r#2 <- `r*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(state : state, dataidx : dataidx, byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, `b*` : byte*}(z, x, b#3*{b#3 <- `b*`}) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b*{b <- `b*`}], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b#4*{b#4 <- `b*`}], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(state : state, structaddr : structaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(state : state, arrayaddr : arrayaddr, nat : nat, fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(state : state, structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(state : state, arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(state : state, exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(tableinst : tableinst, nat : nat, ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{tableinst : tableinst, n : nat, r : ref, tableinst' : tableinst, i' : uN}(tableinst, n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, `j?` : u64?, rt : reftype, `r'*` : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#1?{j#1 <- `j?`}), rt), REFS r'#1*{r'#1 <- `r'*`}} = tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#2?{j#2 <- `j?`}), rt), REFS r'#2*{r'#2 <- `r'*`} ++ r^n{}}) + -- if ($proj_uN_0(i').0 = (|r'#3*{r'#3 <- `r'*`}| + n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#3).0))?{j#3 <- `j?`} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size($numtype_addrtype(at))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#4?{j#4 <- `j?`}), rt), REFS r'#4*{r'#4 <- `r'*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j#5?{j#5 <- `j?`}), rt), REFS r'#5*{r'#5 <- `r'*`} ++ r^n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{meminst : meminst, n : nat, meminst' : meminst, i' : uN}(meminst, n) = ?(meminst') + -- let{at : addrtype, i : u64, `j?` : u64?, `b*` : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#6?{j#6 <- `j?`})), BYTES b#5*{b#5 <- `b*`}} = meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#7?{j#7 <- `j?`})), BYTES b#6*{b#6 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b#7*{b#7 <- `b*`}| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#8).0))?{j#8 <- `j?`} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size($numtype_addrtype(at)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#9?{j#9 <- `j?`})), BYTES b#8*{b#8 <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j#10?{j#10 <- `j?`})), BYTES b#9*{b#9 <- `b*`} ++ `%`_byte(0,)^(n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(store : store, result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{store : store, result : result}: + `%`(RES_hostcallresult(store, result),) + -- wf_store: `%`(store,) + -- wf_result: `%`(result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(hostfunc : hostfunc, store : store, val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{`val*` : val*}(_VALS_result(val#1*{val#1 <- `val*`})) = $instr_val(val)*{val <- `val*`} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, nt : numtype, c : num_}: + `%|-%:%`(s, CONST_num(nt, c), nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, vt : vectype, c : vec_}: + `%|-%:%`(s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{s : store}: + `%|-%:%`(s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{s : store, i : u31}: + `%|-%:%`(s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.STRUCTS_store|) + -- if (s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.ARRAYS_store|) + -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{s : store, a : addr, dt : deftype}: + `%|-%:%`(s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{s : store, a : addr, exn : exninst}: + `%|-%:%`(s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (a < |s.EXNS_store|) + -- if (s.EXNS_store[a] = exn) + -- wf_store: `%`(s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{s : store, a : addr}: + `%|-%:%`(s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{s : store, ref : ref}: + `%|-%:%`(s, `REF.EXTERN`_ref(ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(s, ref, REF_reftype(?(), ANY_heaptype)) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{s : store, ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(s, ref, rt) + -- Ref_ok: `%|-%:%`(s, ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{s : store, num : num, nt : numtype}: + `%|-%:%`(s, $val_num(num), $valtype_numtype(nt)) + -- Num_ok: `%|-%:%`(s, num, nt) + -- wf_store: `%`(s,) + -- wf_num: `%`(num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{s : store, vec : vec, vt : vectype}: + `%|-%:%`(s, $val_vec(vec), $valtype_vectype(vt)) + -- Vec_ok: `%|-%:%`(s, vec, vt) + -- wf_store: `%`(s,) + -- wf_vec: `%`(vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{s : store, ref : ref, rt : reftype}: + `%|-%:%`(s, $val_ref(ref), $valtype_reftype(rt)) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_ref: `%`(ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule _{s : store, pt : packtype, c : iN}: + `%|-%:%`(s, PACK_packval(pt, c), pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{s : store, val : val, t : valtype}: + `%|-%:%`(s, $fieldval_val(val), $storagetype_valtype(t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{s : store, packval : packval, pt : packtype}: + `%|-%:%`(s, $fieldval_packval(packval), $storagetype_packtype(pt)) + -- Packval_ok: `%|-%:%`(s, packval, pt) + -- wf_store: `%`(s,) + -- wf_packval: `%`(packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{s : store, a : addr, taginst : taginst}: + `%|-%:%`(s, TAG_externaddr(a), TAG_externtype(taginst.TYPE_taginst)) + -- if (a < |s.TAGS_store|) + -- if (s.TAGS_store[a] = taginst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TAG_externtype(taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{s : store, a : addr, globalinst : globalinst}: + `%|-%:%`(s, GLOBAL_externaddr(a), GLOBAL_externtype(globalinst.TYPE_globalinst)) + -- if (a < |s.GLOBALS_store|) + -- if (s.GLOBALS_store[a] = globalinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(GLOBAL_externtype(globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{s : store, a : addr, meminst : meminst}: + `%|-%:%`(s, MEM_externaddr(a), MEM_externtype(meminst.TYPE_meminst)) + -- if (a < |s.MEMS_store|) + -- if (s.MEMS_store[a] = meminst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(MEM_externtype(meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{s : store, a : addr, tableinst : tableinst}: + `%|-%:%`(s, TABLE_externaddr(a), TABLE_externtype(tableinst.TYPE_tableinst)) + -- if (a < |s.TABLES_store|) + -- if (s.TABLES_store[a] = tableinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(TABLE_externtype(tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{s : store, a : addr, funcinst : funcinst}: + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype($typeuse_deftype(funcinst.TYPE_funcinst))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = funcinst) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(funcinst.TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(s, externaddr, xt) + -- Externaddr_ok: `%|-%:%`(s, externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (iter_val#3 : deftype <: typeuse)*{iter_val#3 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (iter_val#4 : deftype <: typeuse)*{iter_val#4 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (iter_val#5 : deftype <: typeuse)*{iter_val#5 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (iter_val#6 : deftype <: typeuse)*{iter_val#6 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (iter_val#7 : deftype <: typeuse)*{iter_val#7 <- moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{val : val}: + `%~>%`([$instr_val(val) DROP_instr], []) + -- wf_val: `%`(val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-true`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [$instr_val(val_1)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `select-false`{val_1 : val, val_2 : val, c : num_, `t*?` : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`})], [$instr_val(val_2)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-true`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1*{instr_1 <- `instr_1*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `if-false`{c : num_, bt : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})], [BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`})]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`}),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2*{instr_2 <- `instr_2*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `label-vals`{n : n, `instr*` : instr*, `val*` : val*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, $instr_val(val)*{val <- `val*`})], $instr_val(val)*{val <- `val*`}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr*{instr <- `instr*`}, $instr_val(val)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-zero`{n : n, `instr'*` : instr*, `val'*` : val*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)^n{val <- `val*`} ++ instr'*{instr' <- `instr'*`}) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-label-succ`{n : n, `instr'*` : instr*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br-handler`{n : n, `catch*` : catch*, `val*` : val*, l : labelidx, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-true`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_if-false`{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-lt`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l*{l <- `l*`}|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l*{l <- `l*`}[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_table-ge`{i : num_, `l*` : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l*{l <- `l*`}, l')], [BR_instr(l')]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l*{l <- `l*`}|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l*{l <- `l*`}, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-null`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_null-addr`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NULL_instr(l)], [$instr_val(val)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-null`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NON_NULL_instr(l)], []) + -- if (val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_non_null-addr`{val : val, l : labelidx}: + `%~>%`([$instr_val(val) BR_ON_NON_NULL_instr(l)], [$instr_val(val) BR_instr(l)]) + -- if (val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `frame-vals`{n : n, f : frame, `val*` : val*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, $instr_val(val)^n{val <- `val*`})], $instr_val(val)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, $instr_val(val)^n{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-frame`{n : n, f : frame, `val'*` : val*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)^n{val <- `val*`}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-label`{n : n, `instr'*` : instr*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return-handler`{n : n, `catch*` : catch*, `val*` : val*, `instr*` : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`})], $instr_val(val)*{val <- `val*`} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `handler-vals`{n : n, `catch*` : catch*, `val*` : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`})], $instr_val(val)*{val <- `val*`}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-instrs`{`val*` : val*, `instr*` : instr*}: + `%~>%`($instr_val(val)*{val <- `val*`} ++ [TRAP_instr] ++ instr*{instr <- `instr*`}, [TRAP_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-label`{n : n, `instr'*` : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-handler`{n : n, `catch*` : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `trap-frame`{n : n, f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(n, f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.tee`{val : val, x : idx}: + `%~>%`([$instr_val(val) `LOCAL.TEE`_instr(x)], [$instr_val(val) $instr_val(val) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.i31`{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-true`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.is_null-false`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-null`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.as_non_null-addr`{ref : ref}: + `%~>%`([$instr_ref(ref) `REF.AS_NON_NULL`_instr], [$instr_ref(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-true`{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.eq-false`{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-null`{sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `i31.get-num`{i : u31, sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new`{val : val, n : n, x : idx}: + `%~>%`([$instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW`_instr(x)], $instr_val(val)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- wf_val: `%`(val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-null`{ref : ref}: + `%~>%`([$instr_ref(ref) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `extern.convert_any-addr`{ref : ref}: + `%~>%`([$instr_ref(ref) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(ref)]) + -- if (ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-null`: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `any.convert_extern-addr`{ref : ref}: + `%~>%`([`REF.EXTERN`_instr(ref) `ANY.CONVERT_EXTERN`_instr], [$instr_ref(ref)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-val`{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (|$unop_(nt, unop, c_1)| > 0) + -- if (c <- $unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `unop-trap`{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-val`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (|$binop_(nt, binop, c_1, c_2)| > 0) + -- if (c <- $binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `binop-trap`{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-val`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (|$cvtop__(nt_1, nt_2, cvtop, c_1)| > 0) + -- if (c <- $cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `cvtop-trap`{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvunop_(V128_vectype, vvunop, c_1)| > 0) + -- if (c <- $vvunop_(V128_vectype, vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvbinop_(V128_vectype, vvbinop, c_1, c_2)| > 0) + -- if (c <- $vvbinop_(V128_vectype, vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vvternop_(V128_vectype, vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-val`{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vunop_(sh, vunop, c_1)| > 0) + -- if (c <- $vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vunop-trap`{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-val`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vbinop_(sh, vbinop, c_1, c_2)| > 0) + -- if (c <- $vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vbinop-trap`{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-val`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vternop-trap`{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, Jnn : Jnn, M : M, c : num_, `i*` : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i*{i <- `i*`} = $lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c_1)) + -- if ($proj_num__0(c) =/= ?()) + -- (if ($proj_lane__2(i) =/= ?()))*{i <- `i*`} + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(Jnn), !($proj_lane__2(i)))).0*{i <- `i*`})) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), i))*{i <- `i*`} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_vtestop__0_vtestop_(Jnn, M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (c = $vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, `i*` : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i*{i <- `i*`})], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i*{i <- `i*`}, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i*{i <- `i*`}),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{Lnn : Lnn, c_1 : num_, M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(Lnn), c_1) VSPLAT_instr(`%X%`_shape(Lnn, M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lpacknum_(Lnn, c_1)^$proj_dim_0(M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(Lnn, M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-num`{c_1 : vec_, nt : numtype, M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_numtype(nt), M), c_1)|) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape($lanetype_numtype(nt), M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_numtype(nt), M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape($lanetype_numtype(nt), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vextract_lane-pack`{c_1 : vec_, pt : packtype, M : M, sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), M), ?(sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if ($proj_num__0(c_2) =/= ?()) + -- if ($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)|) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, sx, !($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), M), ?(sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape($lanetype_packtype(pt), M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, Lnn : Lnn, c_2 : num_, M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(Lnn, M), $lanes_(`%X%`_shape(Lnn, M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(Lnn, M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(Lnn, M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(state : state, blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, `t_1*` : valtype*, `t_2*` : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + -- Expand: `%~~%`($type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1#4*{t_1#4 <- `t_1*`},), `%`_resulttype(t_2#8*{t_2#8 <- `t_2*`},))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1#5*{t_1#5 <- `t_1*`},), [], `%`_resulttype(t_2#9*{t_2#9 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#6*{t_1#6 <- `t_1*`},), `%`_resulttype(t_2#10*{t_2#10 <- `t_2*`},)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, `t?` : valtype?}(z, _RESULT_blocktype(t#5?{t#5 <- `t?`})) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t?{t <- `t?`}),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t#6?{t#6 <- `t?`}),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_br_on_cast_fail-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed_0`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_throw_ref-handler-next`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_0`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_0`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob_2`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_table.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob_0`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero_0`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_memory.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob_1`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_memory.init-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob_0`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.test-false`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_ref.cast-fail`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed_0`{s : store, f : frame, ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.fill-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob_0`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-le`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.copy-gt`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le_0`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-le`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero_1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ `Step_read_before_array.copy-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1_2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_elem-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-zero`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation `Step_read_before_array.init_data-num`: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero_0`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1_1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [BLOCK_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, m : m, `val*` : val*, bt : blocktype, `instr*` : instr*, `t_1*` : valtype*, n : n, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]), [`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [LOOP_instr(bt, instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(m, [LOOP_instr(bt, instr*{instr <- `instr*`})], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(ref) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(ref)]) + -- ~ `Step_read_before_br_on_cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-succeed`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(ref)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `br_on_cast_fail-fail`{s : store, f : frame, ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(ref) BR_instr(l)]) + -- ~ `Step_read_before_br_on_cast_fail-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-label`{z : state, k : n, `instr'*` : instr*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'*{instr' <- `instr'*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-handler`{z : state, k : n, `catch*` : catch*, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch*{catch <- `catch*`}, $instr_val(val)*{val <- `val*`} ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-null`{z : state, k : n, f : frame, `val*` : val*, yy : typeuse, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val)*{val <- `val*`} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `return_call_ref-frame-addr`{z : state, k : n, f : frame, `val'*` : val*, n : n, `val*` : val*, a : addr, yy : typeuse, `instr*` : instr*, `t_1*` : valtype*, m : m, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- if (a < |$s(z).FUNCS_store|) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, f, $instr_val(val')*{val' <- `val'*`} ++ $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-instrs`{z : state, `val*` : val*, a : addr, `instr*` : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val*{val <- `val*`} =/= []) \/ (instr*{instr <- `instr*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr*{instr <- `instr*`}),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-label`{z : state, n : n, `instr'*` : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-frame`{z : state, n : n, f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(n, f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-empty`{z : state, n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(val)*{val <- `val*`} ++ [BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_ref`{z : state, n : n, x : idx, l : labelidx, `catch'*` : catch*, a : addr, `val*` : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(val)*{val <- `val*`} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val*{val <- `val*`} = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_REF_catch(x, l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-catch_all_ref`{z : state, n : n, l : labelidx, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [CATCH_ALL_REF_catch(l)] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `throw_ref-handler-next`{z : state, n : n, catch : catch, `catch'*` : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ `Step_read_before_throw_ref-handler-next`: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, [catch] ++ catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch'*{catch' <- `catch'*`}, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, m : m, `val*` : val*, bt : blocktype, `catch*` : catch*, `instr*` : instr*, n : n, `t_1*` : valtype*, `t_2*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]), [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^m{val <- `val*`} ++ [TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, [`LABEL_%{%}%`_instr(n, [], $instr_val(val)^m{val <- `val*`} ++ instr*{instr <- `instr*`})]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1^m{t_1 <- `t_1*`},), [], `%`_resulttype(t_2^n{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `local.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [$instr_val(val)]) + -- if ($local(z, x) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `global.get`{z : state, x : idx, val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [$instr_val(val)]) + -- if ($global(z, x).VALUE_globalinst = val) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-oob`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.get-val`{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [$instr_ref($table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.size`{z : state, x : idx, at : addrtype, n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if (|$table(z, x).REFS_tableinst| = n) + -- if ($table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(val) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ `Step_read_before_table.copy-zero`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-le`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_table.copy-gt`: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `table.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) $instr_ref($elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-num-val`{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($nbytes_(nt, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `load-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, n : n, sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]), [CONST_instr($numtype_addrtype(Inn), mk_num__0_num_(Inn, $extend__(n, $size($numtype_addrtype(Inn)), sx, c)))]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(n, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(Inn), ?(mk_loadop__0_loadop_(Inn, `%_%`_loadop_Inn(`%`_sz(n,), sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(Inn), mk_num__0_num_(Inn, $extend__(n, $size($numtype_addrtype(Inn)), sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-oob`{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-num-val`{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($vbytes_(V128_vectype, c) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-oob`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((K * $proj_dim_0(M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-pack-val`{z : state, at : addrtype, i : num_, K : K, M : M, sx : sx, x : idx, ao : memarg, c : vec_, `j*` : iN*, Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($proj_num__0(i) =/= ?()))^(k<$proj_dim_0(M).0){} + -- (if ($ibytes_(K, j) = $mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(M).0){j <- `j*`} + -- if ((c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))^$proj_dim_0(M).0{j <- `j*`})) /\ ($jsizenn(Jnn) = (K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(K,), M, sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- (wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, $extend__(K, $jsizenn(Jnn), sx, j))))^$proj_dim_0(M).0{j <- `j*`} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-splat-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-oob`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload-zero-val`{z : state, at : addrtype, i : num_, N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, j) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(N, 128, U_sx, j)) + -- wf_uN: `%%`(N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-oob`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `vload_lane-val`{z : state, at : addrtype, i : num_, c_1 : vec_, N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(N, k) = $mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), $lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(Jnn), M),) + -- wf_lane_: `%%`($lanetype(`%X%`_shape($lanetype_Jnn(Jnn), M)), mk_lane__2_lane_(Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.size`{z : state, x : idx, at : addrtype, n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,)))]) + -- if ((n * (64 * $Ki)) = |$mem(z, x).BYTES_meminst|) + -- if ($mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-oob`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-zero`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.fill-succ`{z : state, at : addrtype, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(val) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-oob`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-zero`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-le`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.copy-gt`{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-oob`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) > |$mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-zero`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `memory.init-succ`{z : state, at : addrtype, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$data(z, y).BYTES_datainst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.null`{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.func`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-true`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.test-false`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ `Step_read_before_ref.test-false`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-succeed`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]), [$instr_ref(ref)]) + -- Ref_ok: `%|-%:%`(s, ref, $inst_reftype(f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `ref.cast-fail`{s : store, f : frame, ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ `Step_read_before_ref.cast-fail`: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [$instr_ref(ref) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.new_default`{z : state, x : idx, `val*` : val*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), $instr_val(val)*{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`val*`| = |`zt*`|) + -- (if ($default_($unpack(zt)) =/= ?()))*{zt <- `zt*`} + -- (if (!($default_($unpack(zt))) = ?(val)))*{val <- `val*`, zt <- `zt*`} + -- (wf_val: `%`(val,))*{val <- `val*`} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-null`{z : state, `sx?` : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `struct.get-struct`{z : state, a : addr, `sx?` : sx?, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]), [$instr_val(!($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])))]) + -- if ($unpackfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], sx?{sx <- `sx?`}, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- if ($proj_uN_0(i).0 < |$s(z).STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |$s(z).STRUCTS_store|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_default`{z : state, n : n, x : idx, val : val, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), $instr_val(val)^n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($default_($unpack(zt)) =/= ?()) + -- if (!($default_($unpack(zt))) = ?(val)) + -- wf_val: `%`(val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-oob`{z : state, i : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_elem-alloc`{z : state, i : num_, n : n, x : idx, y : idx, `ref*` : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), $instr_ref(ref)^n{ref <- `ref*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- if ($proj_num__0(i) =/= ?()) + -- if (ref^n{ref <- `ref*`} = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : n]) + -- (wf_ref: `%`(ref,))*{ref <- `ref*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-oob`{z : state, i : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(i) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.new_data-num`{z : state, i : num_, n : n, x : idx, y : idx, zt : storagetype, `c*` : lit_*, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^n{c <- `c*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]) + -- (if ($cunpack(zt) =/= ?()))^n{} + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zsize(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^n{c <- `c*`}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- `c*`} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-null`{z : state, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-oob`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.get-array`{z : state, a : addr, i : num_, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]), [$instr_val(!($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])))]) + -- if ($unpackfield_(zt, sx?{sx <- `sx?`}, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0]) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_num__0(i) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-null`{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.len-array`{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- if (a < |$s(z).ARRAYS_store|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-null`{z : state, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-oob`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-zero`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.fill-succ`{z : state, a : addr, i : num_, val : val, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (n =/= 0) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null1`{z : state, i_1 : num_, ref : ref, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-null2`{z : state, ref : ref, i_1 : num_, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob1`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-oob2`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-zero`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-le`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (n =/= 0) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx?{sx <- `sx?`} = $sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.copy-gt`{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, n : n, x_1 : idx, x_2 : idx, `sx?` : sx?, `mut?` : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ `Step_read_before_array.copy-gt`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) + -- if (sx?{sx <- `sx?`} = $sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) > |$elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_elem-succ`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_ref(ref) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if (n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + n) <= |$elem(z, y).REFS_eleminst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$elem(z, y).REFS_eleminst|) + -- if (ref = $elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-null`{z : state, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob1`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-oob2`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-zero`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ `Step_read_before_array.init_data-zero`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule `array.init_data-num`{z : state, a : addr, i : num_, j : num_, n : n, x : idx, y : idx, zt : storagetype, c : lit_, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- if ($cunpack(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- ~ `Step_read_before_array.init_data-num`: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if ($zbytes_(zt, c) = $data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_pure: `%~>%`(instr*{instr <- `instr*`}, instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, `instr*` : instr*, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr'*{instr' <- `instr'*`})) + -- Step_read: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), instr'*{instr' <- `instr'*`}) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z, instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule `ctxt-instrs`{z : state, `val*` : val*, `instr*` : instr*, `instr_1*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}), `%;%`_config(z', $instr_val(val)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- if ((val*{val <- `val*`} =/= []) \/ (instr_1*{instr_1 <- `instr_1*`} =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)*{val <- `val*`} ++ instr*{instr <- `instr*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(val)*{val <- `val*`} ++ instr'*{instr' <- `instr'*`} ++ instr_1*{instr_1 <- `instr_1*`}),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule `ctxt-label`{z : state, n : n, `instr_0*` : instr*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(n, instr_0*{instr_0 <- `instr_0*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule `ctxt-handler`{z : state, n : n, `catch*` : catch*, `instr*` : instr*, z' : state, `instr'*` : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule `ctxt-frame`{s : store, f : frame, n : n, f' : frame, `instr*` : instr*, s' : store, f'' : frame, `instr'*` : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]), `%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}), `%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`})) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), [`FRAME_%{%}%`_instr(n, f', instr*{instr <- `instr*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), [`FRAME_%{%}%`_instr(n, f'', instr'*{instr' <- `instr'*`})]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f'), instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'*{instr' <- `instr'*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule `call_ref-null`{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule `call_ref-func`{z : state, n : n, `val*` : val*, a : addr, yy : typeuse, m : m, f : frame, `instr*` : instr*, fi : funcinst, `t_1*` : valtype*, `t_2*` : valtype*, x : idx, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])])) + -- if (a < |$s(z).FUNCS_store|) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`})) + -- (if ($default_(t) =/= ?()))*{t <- `t*`} + -- if (f = {LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(m, f, [`LABEL_%{%}%`_instr(m, [], instr*{instr <- `instr*`})])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- `t*`}, instr*{instr <- `instr*`}),) + -- wf_frame: `%`({LOCALS ?(val)^n{val <- `val*`} ++ !($default_(t))*{t <- `t*`}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule `call_ref-hostfunc-res`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, s' : store, result : result, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', f), $lift_result(result))) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (RES_hostcallresult(s', result) <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f), $lift_result(result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule `call_ref-hostfunc-div`{s : store, f : frame, n : n, `val*` : val*, a : addr, yy : typeuse, fi : funcinst, `t_1*` : valtype*, m : m, `t_2*` : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (a < |s.FUNCS_store|) + -- if (s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})| > 0) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), s, val^n{val <- `val*`})) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), $instr_val(val)^n{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1^n{t_1 <- `t_1*`},), `%`_resulttype(t_2^m{t_2 <- `t_2*`},)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, n : n, `val*` : val*, x : idx, exn : exninst, a : addr, `t*` : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- if ($as_deftype($tag(z, x).TYPE_taginst) =/= ?()) + -- Expand: `%~~%`(!($as_deftype($tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t^n{t <- `t*`},), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule `local.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(val) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(val) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule `global.set`{z : state, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(val) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(val) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule `table.set-oob`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule `table.set-val`{z : state, at : addrtype, i : num_, ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule `table.grow-succeed`{z : state, ref : ref, at : addrtype, n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))])) + -- if ($growtable($table(z, x), n, ref) =/= ?()) + -- if (ti = !($growtable($table(z, x), n, ref))) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule `table.grow-fail`{z : state, ref : ref, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule `elem.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule `store-num-oob`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule `store-num-val`{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule `store-pack-oob`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule `store-pack-val`{z : state, at : addrtype, i : num_, Inn : Inn, c : num_, n : n, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(c) =/= ?()) + -- if (b*{b <- `b*`} = $ibytes_(n, $wrap__($size($numtype_addrtype(Inn)), n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(Inn), c) STORE_instr($numtype_addrtype(Inn), ?(mk_storeop__0_storeop_(Inn, `%`_storeop_Inn(`%`_sz(n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule `vstore-oob`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule `vstore-val`{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, `b*` : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b*{b <- `b*`} = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule `vstore_lane-oob`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule `vstore_lane-val`{z : state, at : addrtype, i : num_, c : vec_, N : N, x : idx, ao : memarg, j : laneidx, `b*` : byte*, Jnn : Jnn, M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (N = $jsize(Jnn)) + -- if (($proj_dim_0(M).0 : nat <:> rat) = ((128 : nat <:> rat) / (N : nat <:> rat))) + -- if ($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]) =/= ?()) + -- if ($proj_uN_0(j).0 < |$lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)|) + -- if (b*{b <- `b*`} = $ibytes_(N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b*{b <- `b*`}), []),) + -- wf_uN: `%%`(N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(Jnn), M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule `memory.grow-succeed`{z : state, at : addrtype, n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if ($growmem($mem(z, x), n) =/= ?()) + -- if (mi = !($growmem($mem(z, x), n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule `memory.grow-fail`{z : state, at : addrtype, n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule `data.drop`{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule `struct.new`{z : state, n : n, `val*` : val*, x : idx, si : structinst, a : addr, `mut?*` : mut?*, `zt*` : storagetype*}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (a = |$s(z).STRUCTS_store|) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`, zt <- `zt*`} + -- if (si = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)^n{`mut?` <- `mut?*`, zt <- `zt*`},)),) + -- wf_structinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`, zt <- `zt*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule `struct.set-null`{z : state, val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(val) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule `struct.set-struct`{z : state, a : addr, val : val, x : idx, i : fieldidx, `zt*` : storagetype*, `mut?*` : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(val) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), [])) + -- if ($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt*{zt <- `zt*`}|) + -- Expand: `%~~%`($type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt*{zt <- `zt*`}[$proj_uN_0(i).0], val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule `array.new_fixed`{z : state, n : n, `val*` : val*, x : idx, ai : arrayinst, a : addr, `mut?` : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (if ($packfield_(zt, val) =/= ?()))^n{val <- `val*`} + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}})) + -- wf_config: `%`(`%;%`_config(z, $instr_val(val)^n{val <- `val*`} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + -- wf_arrayinst: `%`({TYPE $type(z, x), FIELDS !($packfield_(zt, val))^n{val <- `val*`}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule `array.set-null`{z : state, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule `array.set-oob`{z : state, a : addr, i : num_, val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule `array.set-array`{z : state, a : addr, i : num_, val : val, x : idx, zt : storagetype, `mut?` : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($packfield_(zt, val) =/= ?()) + -- Expand: `%~~%`($type(z, x), ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, `instr*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z, instr*{instr <- `instr*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, `instr*` : instr*, z'' : state, `instr''*` : instr*, z' : state, `instr'*` : instr*}: + `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- Step: `%~>%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', instr'*{instr' <- `instr'*`})) + -- Steps: `%~>*%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}), `%;%`_config(z'', instr''*{instr'' <- `instr''*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z'', instr''*{instr'' <- `instr''*`}),) + -- wf_config: `%`(`%;%`_config(z', instr'*{instr' <- `instr'*`}),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule _{z : state, `instr*` : instr*, z' : state, `val*` : val*}: + `%;%~>*%;%`(z, instr*{instr <- `instr*`}, z', val*{val <- `val*`}) + -- Steps: `%~>*%`(`%;%`_config(z, instr*{instr <- `instr*`}), `%;%`_config(z', $instr_val(val)*{val <- `val*`})) + -- wf_config: `%`(`%;%`_config(z, instr*{instr <- `instr*`}),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(val)*{val <- `val*`}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{`type'*` : type*, type : type, `deftype*` : deftype*, x : uN}(type'#1*{type'#1 <- `type'*`} ++ [type]) = deftype'*{deftype' <- `deftype'*`} ++ deftype*{deftype <- `deftype*`} + -- let{`deftype'*` : deftype*} deftype'#1*{deftype'#1 <- `deftype'*`} = $alloctypes(type'#2*{type'#2 <- `type'*`}) + -- let{rectype : rectype} TYPE_type(rectype) = type + -- if (deftype#1*{deftype#1 <- `deftype*`} = $subst_all_deftypes($rolldt(x, rectype), $typeuse_deftype(deftype'#2)*{deftype'#2 <- `deftype'*`})) + -- if ($proj_uN_0(x).0 = |deftype'#3*{deftype'#3 <- `deftype'*`}|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(store : store, tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{s : store, tagtype : typeuse, taginst : taginst}(s, tagtype) = (s +++ {TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TAGS_store|) + -- if (taginst = {TYPE tagtype}) + -- wf_store: `%`({TAGS [taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(store : store, tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{s : store, tagtype : typeuse, `tagtype'*` : tagtype*}(s, [tagtype] ++ tagtype'#1*{tagtype'#1 <- `tagtype'*`}) = (s_2, [ja] ++ ja'*{ja' <- `ja'*`}) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(s, tagtype) + -- let{s_2 : store, `ja'*` : tagaddr*} (s_2, ja'#1*{ja'#1 <- `ja'*`}) = $alloctags(s_1, tagtype'#2*{tagtype'#2 <- `tagtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(store : store, globaltype : globaltype, val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{s : store, globaltype : globaltype, val : val, globalinst : globalinst}(s, globaltype, val) = (s +++ {TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.GLOBALS_store|) + -- if (globalinst = {TYPE globaltype, VALUE val}) + -- wf_store: `%`({TAGS [], GLOBALS [globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE globaltype, VALUE val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(store : store, globaltype*, val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{s : store, globaltype : globaltype, `globaltype'*` : globaltype*, val : val, `val'*` : val*}(s, [globaltype] ++ globaltype'#1*{globaltype'#1 <- `globaltype'*`}, [val] ++ val'#1*{val'#1 <- `val'*`}) = (s_2, [ga] ++ ga'*{ga' <- `ga'*`}) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(s, globaltype, val) + -- let{s_2 : store, `ga'*` : globaladdr*} (s_2, ga'#1*{ga'#1 <- `ga'*`}) = $allocglobals(s_1, globaltype'#2*{globaltype'#2 <- `globaltype'*`}, val'#2*{val'#2 <- `val'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(store : store, memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{s : store, at : addrtype, i : uN, `j?` : u64?, meminst : meminst}(s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#11?{j#11 <- `j?`}))) = (s +++ {TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.MEMS_store|) + -- if (meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#12?{j#12 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j#13?{j#13 <- `j?`})), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(store : store, memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{s : store}(s, []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{s : store, memtype : memtype, `memtype'*` : memtype*}(s, [memtype] ++ memtype'#1*{memtype'#1 <- `memtype'*`}) = (s_2, [ma] ++ ma'*{ma' <- `ma'*`}) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(s, memtype) + -- let{s_2 : store, `ma'*` : memaddr*} (s_2, ma'#1*{ma'#1 <- `ma'*`}) = $allocmems(s_1, memtype'#2*{memtype'#2 <- `memtype'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(store : store, tabletype : tabletype, ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{s : store, at : addrtype, i : uN, `j?` : u64?, rt : reftype, ref : ref, tableinst : tableinst}(s, `%%%`_tabletype(at, `[%..%]`_limits(i, j#16?{j#16 <- `j?`}), rt), ref) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.TABLES_store|) + -- if (tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#17?{j#17 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j#18?{j#18 <- `j?`}), rt), REFS ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(store : store, tabletype*, ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{s : store, tabletype : tabletype, `tabletype'*` : tabletype*, ref : ref, `ref'*` : ref*}(s, [tabletype] ++ tabletype'#1*{tabletype'#1 <- `tabletype'*`}, [ref] ++ ref'#1*{ref'#1 <- `ref'*`}) = (s_2, [ta] ++ ta'*{ta' <- `ta'*`}) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(s, tabletype, ref) + -- let{s_2 : store, `ta'*` : tableaddr*} (s_2, ta'#1*{ta'#1 <- `ta'*`}) = $alloctables(s_1, tabletype'#2*{tabletype'#2 <- `tabletype'*`}, ref'#2*{ref'#2 <- `ref'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(store : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{s : store, deftype : deftype, funccode : funccode, moduleinst : moduleinst, funcinst : funcinst}(s, deftype, funccode, moduleinst) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.FUNCS_store|) + -- if (funcinst = {TYPE deftype, MODULE moduleinst, CODE funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE deftype, MODULE moduleinst, CODE funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(store : store, deftype*, funccode*, moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{s : store}(s, [], [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{s : store, dt : deftype, `dt'*` : deftype*, funccode : funccode, `funccode'*` : funccode*, moduleinst : moduleinst, `moduleinst'*` : moduleinst*}(s, [dt] ++ dt'#5*{dt'#5 <- `dt'*`}, [funccode] ++ funccode'#1*{funccode'#1 <- `funccode'*`}, [moduleinst] ++ moduleinst'#1*{moduleinst'#1 <- `moduleinst'*`}) = (s_2, [fa] ++ fa'*{fa' <- `fa'*`}) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(s, dt, funccode, moduleinst) + -- let{s_2 : store, `fa'*` : funcaddr*} (s_2, fa'#1*{fa'#1 <- `fa'*`}) = $allocfuncs(s_1, dt'#6*{dt'#6 <- `dt'*`}, funccode'#2*{funccode'#2 <- `funccode'*`}, moduleinst'#2*{moduleinst'#2 <- `moduleinst'*`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(store : store, datatype : datatype, byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{s : store, `byte*` : byte*, datainst : datainst}(s, OK_datatype, byte#2*{byte#2 <- `byte*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |s.DATAS_store|) + -- if (datainst = {BYTES byte#3*{byte#3 <- `byte*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte#4*{byte#4 <- `byte*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(store : store, datatype*, byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{s : store, ok : datatype, `ok'*` : datatype*, `b*` : byte*, `b'**` : byte**}(s, [ok] ++ ok'#1*{ok'#1 <- `ok'*`}, [b#10*{b#10 <- `b*`}] ++ b'#1*{b'#1 <- `b'*#1`}*{`b'*#1` <- `b'**`}) = (s_2, [da] ++ da'*{da' <- `da'*`}) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(s, ok, b#11*{b#11 <- `b*`}) + -- let{s_2 : store, `da'*` : dataaddr*} (s_2, da'#1*{da'#1 <- `da'*`}) = $allocdatas(s_1, ok'#2*{ok'#2 <- `ok'*`}, b'#2*{b'#2 <- `b'*#2`}*{`b'*#2` <- `b'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(store : store, elemtype : elemtype, ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{s : store, elemtype : reftype, `ref*` : ref*, eleminst : eleminst}(s, elemtype, ref#1*{ref#1 <- `ref*`}) = (s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []}, |s.ELEMS_store|) + -- if (eleminst = {TYPE elemtype, REFS ref#2*{ref#2 <- `ref*`}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE elemtype, REFS ref#3*{ref#3 <- `ref*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(store : store, elemtype*, ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{s : store}(s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{s : store, rt : reftype, `rt'*` : reftype*, `ref*` : ref*, `ref'**` : ref**}(s, [rt] ++ rt'#1*{rt'#1 <- `rt'*`}, [ref#4*{ref#4 <- `ref*`}] ++ ref'#3*{ref'#3 <- `ref'*#1`}*{`ref'*#1` <- `ref'**`}) = (s_2, [ea] ++ ea'*{ea' <- `ea'*`}) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(s, rt, ref#5*{ref#5 <- `ref*`}) + -- let{s_2 : store, `ea'*` : elemaddr*} (s_2, ea'#1*{ea'#1 <- `ea'*`}) = $allocelems(s_1, rt'#2*{rt'#2 <- `rt'*`}, ref'#4*{ref'#4 <- `ref'*#2`}*{`ref'*#2` <- `ref'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(moduleinst : moduleinst, export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TAG_externidx(x))) = {NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TAG_externaddr(moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, GLOBAL_externidx(x))) = {NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR GLOBAL_externaddr(moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, MEM_externidx(x))) = {NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR MEM_externaddr(moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, TABLE_externidx(x))) = {NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR TABLE_externaddr(moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{moduleinst : moduleinst, name : name, x : uN}(moduleinst, EXPORT_export(name, FUNC_externidx(x))) = {NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME name, ADDR FUNC_externaddr(moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(moduleinst : moduleinst, export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{moduleinst : moduleinst, `export*` : export*}(moduleinst, export#9*{export#9 <- `export*`}) = $allocexport(moduleinst, export)*{export <- `export*`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(store : store, module : module, externaddr*, val*, ref*, ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{s : store, module : module, `externaddr*` : externaddr*, `val_G*` : val*, `ref_T*` : ref*, `ref_E**` : ref**, s_7 : store, moduleinst : moduleinst, `tagtype*` : tagtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `memtype*` : memtype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `expr_F*` : expr*, `local**` : local**, `x*` : idx*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `elemtype*` : elemtype*, `expr_E**` : expr**, `xi*` : exportinst*}(s, module, externaddr#1*{externaddr#1 <- `externaddr*`}, val_G#1*{val_G#1 <- `val_G*`}, ref_T#1*{ref_T#1 <- `ref_T*`}, ref_E#1*{ref_E#1 <- `ref_E*#1`}*{`ref_E*#1` <- `ref_E**`}) = (s_7, moduleinst) + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#2*{type#2 <- `type*`},), `%`_list(import#2*{import#2 <- `import*`},), `%`_list(tag#2*{tag#2 <- `tag*`},), `%`_list(global#4*{global#4 <- `global*`},), `%`_list(mem#8*{mem#8 <- `mem*`},), `%`_list(table#8*{table#8 <- `table*`},), `%`_list(func#3*{func#3 <- `func*`},), `%`_list(data#2*{data#2 <- `data*`},), `%`_list(elem#8*{elem#8 <- `elem*`},), start#2?{start#2 <- `start?`}, `%`_list(export#10*{export#10 <- `export*`},)) = module + -- if (tag#3*{tag#3 <- `tag*`} = TAG_tag(tagtype#1)*{tagtype#1 <- `tagtype*`}) + -- if (global#5*{global#5 <- `global*`} = GLOBAL_global(globaltype#122, expr_G#1)*{expr_G#1 <- `expr_G*`, globaltype#122 <- `globaltype*`}) + -- if (mem#9*{mem#9 <- `mem*`} = MEMORY_mem(memtype#1)*{memtype#1 <- `memtype*`}) + -- if (table#9*{table#9 <- `table*`} = TABLE_table(tabletype#156, expr_T#1)*{expr_T#1 <- `expr_T*`, tabletype#156 <- `tabletype*`}) + -- if (func#4*{func#4 <- `func*`} = FUNC_func(x#4, local#3*{local#3 <- `local*#82`}, expr_F#1)*{expr_F#1 <- `expr_F*`, `local*#82` <- `local**`, x#4 <- `x*`}) + -- if (data#3*{data#3 <- `data*`} = DATA_data(byte#5*{byte#5 <- `byte*#110`}, datamode#110)*{`byte*#110` <- `byte**`, datamode#110 <- `datamode*`}) + -- if (elem#9*{elem#9 <- `elem*`} = ELEM_elem(elemtype#1, expr_E#1*{expr_E#1 <- `expr_E*#1`}, elemmode#230)*{elemmode#230 <- `elemmode*`, elemtype#1 <- `elemtype*`, `expr_E*#1` <- `expr_E**`}) + -- let{`aa_I*` : tagaddr*} aa_I#1*{aa_I#1 <- `aa_I*`} = $tagsxa(externaddr#2*{externaddr#2 <- `externaddr*`}) + -- let{`ga_I*` : globaladdr*} ga_I#1*{ga_I#1 <- `ga_I*`} = $globalsxa(externaddr#3*{externaddr#3 <- `externaddr*`}) + -- let{`ma_I*` : memaddr*} ma_I#1*{ma_I#1 <- `ma_I*`} = $memsxa(externaddr#4*{externaddr#4 <- `externaddr*`}) + -- let{`ta_I*` : tableaddr*} ta_I#1*{ta_I#1 <- `ta_I*`} = $tablesxa(externaddr#5*{externaddr#5 <- `externaddr*`}) + -- let{`fa_I*` : funcaddr*} fa_I#1*{fa_I#1 <- `fa_I*`} = $funcsxa(externaddr#6*{externaddr#6 <- `externaddr*`}) + -- let{`dt*` : deftype*} dt#8*{dt#8 <- `dt*`} = $alloctypes(type#3*{type#3 <- `type*`}) + -- let{`fa*` : nat*} fa#1*{fa#1 <- `fa*`} = (|s.FUNCS_store| + i_F#1)^(i_F#1<|func#5*{func#5 <- `func*`}|){} + -- let{s_1 : store, `aa*` : tagaddr*} (s_1, aa#1*{aa#1 <- `aa*`}) = $alloctags(s, $subst_all_tagtype(tagtype#2, $typeuse_deftype(dt#9)*{dt#9 <- `dt*`})*{tagtype#2 <- `tagtype*`}) + -- let{s_2 : store, `ga*` : globaladdr*} (s_2, ga#1*{ga#1 <- `ga*`}) = $allocglobals(s_1, $subst_all_globaltype(globaltype#124, $typeuse_deftype(dt#10)*{dt#10 <- `dt*`})*{globaltype#124 <- `globaltype*`}, val_G#2*{val_G#2 <- `val_G*`}) + -- let{s_3 : store, `ma*` : memaddr*} (s_3, ma#1*{ma#1 <- `ma*`}) = $allocmems(s_2, $subst_all_memtype(memtype#2, $typeuse_deftype(dt#11)*{dt#11 <- `dt*`})*{memtype#2 <- `memtype*`}) + -- let{s_4 : store, `ta*` : tableaddr*} (s_4, ta#1*{ta#1 <- `ta*`}) = $alloctables(s_3, $subst_all_tabletype(tabletype#158, $typeuse_deftype(dt#12)*{dt#12 <- `dt*`})*{tabletype#158 <- `tabletype*`}, ref_T#2*{ref_T#2 <- `ref_T*`}) + -- let{s_5 : store, `da*` : dataaddr*} (s_5, da#1*{da#1 <- `da*`}) = $allocdatas(s_4, OK_datatype^|data#4*{data#4 <- `data*`}|{}, byte#6*{byte#6 <- `byte*#112`}*{`byte*#112` <- `byte**`}) + -- let{s_6 : store, `ea*` : elemaddr*} (s_6, ea#1*{ea#1 <- `ea*`}) = $allocelems(s_5, $subst_all_reftype(elemtype#2, $typeuse_deftype(dt#13)*{dt#13 <- `dt*`})*{elemtype#2 <- `elemtype*`}, ref_E#2*{ref_E#2 <- `ref_E*#2`}*{`ref_E*#2` <- `ref_E**`}) + -- if ((s_7, fa#2*{fa#2 <- `fa*`}) = $allocfuncs(s_6, dt#14*{dt#14 <- `dt*`}[$proj_uN_0(x#5).0]*{x#5 <- `x*`}, FUNC_funccode(x#6, local#4*{local#4 <- `local*#84`}, expr_F#2)*{expr_F#2 <- `expr_F*`, `local*#84` <- `local**`, x#6 <- `x*`}, moduleinst^|func#6*{func#6 <- `func*`}|{})) + -- if (xi#1*{xi#1 <- `xi*`} = $allocexports({TYPES [], TAGS aa_I#2*{aa_I#2 <- `aa_I*`} ++ aa#2*{aa#2 <- `aa*`}, GLOBALS ga_I#2*{ga_I#2 <- `ga_I*`} ++ ga#2*{ga#2 <- `ga*`}, MEMS ma_I#2*{ma_I#2 <- `ma_I*`} ++ ma#2*{ma#2 <- `ma*`}, TABLES ta_I#2*{ta_I#2 <- `ta_I*`} ++ ta#2*{ta#2 <- `ta*`}, FUNCS fa_I#2*{fa_I#2 <- `fa_I*`} ++ fa#3*{fa#3 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []}, export#11*{export#11 <- `export*`})) + -- if (moduleinst = {TYPES dt#15*{dt#15 <- `dt*`}, TAGS aa_I#3*{aa_I#3 <- `aa_I*`} ++ aa#3*{aa#3 <- `aa*`}, GLOBALS ga_I#3*{ga_I#3 <- `ga_I*`} ++ ga#3*{ga#3 <- `ga*`}, MEMS ma_I#3*{ma_I#3 <- `ma_I*`} ++ ma#3*{ma#3 <- `ma*`}, TABLES ta_I#3*{ta_I#3 <- `ta_I*`} ++ ta#3*{ta#3 <- `ta*`}, FUNCS fa_I#3*{fa_I#3 <- `fa_I*`} ++ fa#4*{fa#4 <- `fa*`}, DATAS da#2*{da#2 <- `da*`}, ELEMS ea#2*{ea#2 <- `ea*`}, EXPORTS xi#2*{xi#2 <- `xi*`}}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type#4*{type#4 <- `type*`},), `%`_list(import#3*{import#3 <- `import*`},), `%`_list(tag#4*{tag#4 <- `tag*`},), `%`_list(global#6*{global#6 <- `global*`},), `%`_list(mem#10*{mem#10 <- `mem*`},), `%`_list(table#10*{table#10 <- `table*`},), `%`_list(func#7*{func#7 <- `func*`},), `%`_list(data#5*{data#5 <- `data*`},), `%`_list(elem#10*{elem#10 <- `elem*`},), start#3?{start#3 <- `start?`}, `%`_list(export#12*{export#12 <- `export*`},)),) + -- (wf_tag: `%`(TAG_tag(tagtype#3),))*{tagtype#3 <- `tagtype*`} + -- (wf_global: `%`(GLOBAL_global(globaltype#125, expr_G#2),))*{expr_G#2 <- `expr_G*`, globaltype#125 <- `globaltype*`} + -- (wf_mem: `%`(MEMORY_mem(memtype#3),))*{memtype#3 <- `memtype*`} + -- (wf_table: `%`(TABLE_table(tabletype#159, expr_T#2),))*{expr_T#2 <- `expr_T*`, tabletype#159 <- `tabletype*`} + -- (wf_func: `%`(FUNC_func(x#7, local#5*{local#5 <- `local*#86`}, expr_F#3),))*{expr_F#3 <- `expr_F*`, `local*#86` <- `local**`, x#7 <- `x*`} + -- (wf_data: `%`(DATA_data(byte#7*{byte#7 <- `byte*#113`}, datamode#112),))*{`byte*#113` <- `byte**`, datamode#112 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(elemtype#3, expr_E#2*{expr_E#2 <- `expr_E*#2`}, elemmode#232),))*{elemmode#232 <- `elemmode*`, elemtype#3 <- `elemtype*`, `expr_E*#2` <- `expr_E**`} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I#4*{aa_I#4 <- `aa_I*`} ++ aa#4*{aa#4 <- `aa*`}, GLOBALS ga_I#4*{ga_I#4 <- `ga_I*`} ++ ga#4*{ga#4 <- `ga*`}, MEMS ma_I#4*{ma_I#4 <- `ma_I*`} ++ ma#4*{ma#4 <- `ma*`}, TABLES ta_I#4*{ta_I#4 <- `ta_I*`} ++ ta#4*{ta#4 <- `ta*`}, FUNCS fa_I#4*{fa_I#4 <- `fa_I*`} ++ fa#5*{fa#5 <- `fa*`}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt#16*{dt#16 <- `dt*`}, TAGS aa_I#5*{aa_I#5 <- `aa_I*`} ++ aa#5*{aa#5 <- `aa*`}, GLOBALS ga_I#5*{ga_I#5 <- `ga_I*`} ++ ga#5*{ga#5 <- `ga*`}, MEMS ma_I#5*{ma_I#5 <- `ma_I*`} ++ ma#5*{ma#5 <- `ma*`}, TABLES ta_I#5*{ta_I#5 <- `ta_I*`} ++ ta#5*{ta#5 <- `ta*`}, FUNCS fa_I#5*{fa_I#5 <- `fa_I*`} ++ fa#6*{fa#6 <- `fa*`}, DATAS da#3*{da#3 <- `da*`}, ELEMS ea#3*{ea#3 <- `ea*`}, EXPORTS xi#3*{xi#3 <- `xi*`}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(dataidx : dataidx, data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*}(x, DATA_data(b#12^n{b#12 <- `b*`}, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, n : nat, `b*` : byte*, y : uN, `instr*` : instr*}(x, DATA_data(b#13^n{b#13 <- `b*`}, ACTIVE_datamode(y, instr#8*{instr#8 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(elemidx : elemidx, elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#1^n{e#1 <- `e*`}, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*}(x, ELEM_elem(rt, e#3^n{e#3 <- `e*`}, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, n : nat, `e*` : expr*, y : uN, `instr*` : instr*}(x, ELEM_elem(rt, e#5^n{e#5 <- `e*`}, ACTIVE_elemmode(y, instr#10*{instr#10 <- `instr*`}))) = instr*{instr <- `instr*`} ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(state : state, expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, expr : instr*, `expr'*` : expr*, ref : ref, z' : state}(z, [expr] ++ expr'#1*{expr'#1 <- `expr'*`}) = (z'', [ref] ++ ref'*{ref' <- `ref'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [$val_ref(ref)]) + -- let{z'' : state, `ref'*` : ref*} (z'', ref'#5*{ref'#5 <- `ref'*`}) = $evalexprs(z', expr'#2*{expr'#2 <- `expr'*`}) + -- wf_ref: `%`(ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(state : state, expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, `expr*` : expr*, `expr'**` : expr**}(z, [expr#373*{expr#373 <- `expr*`}] ++ expr'#3*{expr'#3 <- `expr'*#1`}*{`expr'*#1` <- `expr'**`}) = (z'', [ref*{ref <- `ref*`}] ++ ref'*{ref' <- `ref'*`}*{`ref'*` <- `ref'**`}) + -- let{`ref*` : ref*, z' : state} (z', ref#6*{ref#6 <- `ref*`}) = $evalexprs(z, expr#374*{expr#374 <- `expr*`}) + -- let{z'' : state, `ref'**` : ref**} (z'', ref'#6*{ref'#6 <- `ref'*#3`}*{`ref'*#3` <- `ref'**`}) = $evalexprss(z', expr'#4*{expr'#4 <- `expr'*#2`}*{`expr'*#2` <- `expr'**`}) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(state : state, globaltype*, expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, `gt'*` : globaltype*, expr : instr*, `expr'*` : expr*, val : val, z' : state}(z, [gt] ++ gt'#1*{gt'#1 <- `gt'*`}, [expr] ++ expr'#5*{expr'#5 <- `expr'*`}) = (z'', [val] ++ val'*{val' <- `val'*`}) + -- Eval_expr: `%;%~>*%;%`(z, expr, z', [val]) + -- let{s : store, f : frame} `%;%`_state(s, f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(s, gt, val) + -- let{z'' : state, `val'*` : val*} (z'', val'#3*{val'#3 <- `val'*`}) = $evalglobals(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'#2*{gt'#2 <- `gt'*`}, expr'#6*{expr'#6 <- `expr'*`}) + -- wf_val: `%`(val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(s, f),) + -- wf_state: `%`(`%;%`_state(s', f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(store : store, module : module, externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{s : store, module : module, `externaddr*` : externaddr*, `xt_I*` : externtype*, `xt_E*` : externtype*, `expr_G*` : expr*, `globaltype*` : globaltype*, `expr_T*` : expr*, `tabletype*` : tabletype*, `byte**` : byte**, `datamode*` : datamode*, `elemmode*` : elemmode*, `expr_E**` : expr**, `reftype*` : reftype*, `x?` : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(s, module, externaddr#7*{externaddr#7 <- `externaddr*`}) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E*{instr_E <- `instr_E*`} ++ instr_D*{instr_D <- `instr_D*`} ++ lift(instr_S?{instr_S <- `instr_S?`})) + -- Module_ok: `|-%:%`(module, `%->%`_moduletype(xt_I#1*{xt_I#1 <- `xt_I*`}, xt_E#1*{xt_E#1 <- `xt_E*`})) + -- (Externaddr_ok: `%|-%:%`(s, externaddr#8, xt_I#2))*{externaddr#8 <- `externaddr*`, xt_I#2 <- `xt_I*`} + -- let{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*} MODULE_module(`%`_list(type#5*{type#5 <- `type*`},), `%`_list(import#4*{import#4 <- `import*`},), `%`_list(tag#5*{tag#5 <- `tag*`},), `%`_list(global#7*{global#7 <- `global*`},), `%`_list(mem#11*{mem#11 <- `mem*`},), `%`_list(table#11*{table#11 <- `table*`},), `%`_list(func#8*{func#8 <- `func*`},), `%`_list(data#6*{data#6 <- `data*`},), `%`_list(elem#11*{elem#11 <- `elem*`},), start#4?{start#4 <- `start?`}, `%`_list(export#13*{export#13 <- `export*`},)) = module + -- if (global#8*{global#8 <- `global*`} = GLOBAL_global(globaltype#127, expr_G#3)*{expr_G#3 <- `expr_G*`, globaltype#127 <- `globaltype*`}) + -- if (table#12*{table#12 <- `table*`} = TABLE_table(tabletype#161, expr_T#3)*{expr_T#3 <- `expr_T*`, tabletype#161 <- `tabletype*`}) + -- if (data#7*{data#7 <- `data*`} = DATA_data(byte#8*{byte#8 <- `byte*#117`}, datamode#116)*{`byte*#117` <- `byte**`, datamode#116 <- `datamode*`}) + -- if (elem#12*{elem#12 <- `elem*`} = ELEM_elem(reftype#521, expr_E#3*{expr_E#3 <- `expr_E*#3`}, elemmode#237)*{elemmode#237 <- `elemmode*`, `expr_E*#3` <- `expr_E**`, reftype#521 <- `reftype*`}) + -- if (start#5?{start#5 <- `start?`} = START_start(x#8)?{x#8 <- `x?`}) + -- if (moduleinst_0 = {TYPES $alloctypes(type#6*{type#6 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#9*{externaddr#9 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#10*{externaddr#10 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#2)^(i_F#2<|func#9*{func#9 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, `val_G*` : val*} (z', val_G#3*{val_G#3 <- `val_G*`}) = $evalglobals(z, globaltype#129*{globaltype#129 <- `globaltype*`}, expr_G#4*{expr_G#4 <- `expr_G*`}) + -- let{z'' : state, `ref_T*` : ref*} (z'', ref_T#3*{ref_T#3 <- `ref_T*`}) = $evalexprs(z', expr_T#4*{expr_T#4 <- `expr_T*`}) + -- let{z''' : state, `ref_E**` : ref**} (z''', ref_E#3*{ref_E#3 <- `ref_E*#3`}*{`ref_E*#3` <- `ref_E**`}) = $evalexprss(z'', expr_E#4*{expr_E#4 <- `expr_E*#4`}*{`expr_E*#4` <- `expr_E**`}) + -- let{s''' : store, f : frame} `%;%`_state(s''', f) = z''' + -- let{s'''' : store, moduleinst : moduleinst} (s'''', moduleinst) = $allocmodule(s''', module, externaddr#11*{externaddr#11 <- `externaddr*`}, val_G#4*{val_G#4 <- `val_G*`}, ref_T#4*{ref_T#4 <- `ref_T*`}, ref_E#4*{ref_E#4 <- `ref_E*#4`}*{`ref_E*#4` <- `ref_E**`}) + -- let{`instr_D*` : instr*} instr_D#1*{instr_D#1 <- `instr_D*`} = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D#1,), data#9*{data#9 <- `data*`}[i_D#1])^(i_D#1<|data#8*{data#8 <- `data*`}|){}) + -- let{`instr_E*` : instr*} instr_E#1*{instr_E#1 <- `instr_E*`} = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E#1,), elem#14*{elem#14 <- `elem*`}[i_E#1])^(i_E#1<|elem#13*{elem#13 <- `elem*`}|){}) + -- let{`instr_S?` : instr?} instr_S#1?{instr_S#1 <- `instr_S?`} = CALL_instr(x#9)?{x#9 <- `x?`} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE moduleinst}), instr_E#2*{instr_E#2 <- `instr_E*`} ++ instr_D#2*{instr_D#2 <- `instr_D*`} ++ lift(instr_S#2?{instr_S#2 <- `instr_S?`})),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I#3*{xt_I#3 <- `xt_I*`}, xt_E#2*{xt_E#2 <- `xt_E*`}),) + -- wf_module: `%`(MODULE_module(`%`_list(type#7*{type#7 <- `type*`},), `%`_list(import#5*{import#5 <- `import*`},), `%`_list(tag#6*{tag#6 <- `tag*`},), `%`_list(global#9*{global#9 <- `global*`},), `%`_list(mem#12*{mem#12 <- `mem*`},), `%`_list(table#13*{table#13 <- `table*`},), `%`_list(func#10*{func#10 <- `func*`},), `%`_list(data#10*{data#10 <- `data*`},), `%`_list(elem#15*{elem#15 <- `elem*`},), start#6?{start#6 <- `start?`}, `%`_list(export#14*{export#14 <- `export*`},)),) + -- (wf_global: `%`(GLOBAL_global(globaltype#130, expr_G#5),))*{expr_G#5 <- `expr_G*`, globaltype#130 <- `globaltype*`} + -- (wf_table: `%`(TABLE_table(tabletype#163, expr_T#5),))*{expr_T#5 <- `expr_T*`, tabletype#163 <- `tabletype*`} + -- (wf_data: `%`(DATA_data(byte#9*{byte#9 <- `byte*#119`}, datamode#118),))*{`byte*#119` <- `byte**`, datamode#118 <- `datamode*`} + -- (wf_elem: `%`(ELEM_elem(reftype#523, expr_E#5*{expr_E#5 <- `expr_E*#5`}, elemmode#239),))*{elemmode#239 <- `elemmode*`, `expr_E*#5` <- `expr_E**`, reftype#523 <- `reftype*`} + -- (wf_start: `%`(START_start(x#10),))?{x#10 <- `x?`} + -- wf_moduleinst: `%`({TYPES $alloctypes(type#8*{type#8 <- `type*`}), TAGS [], GLOBALS $globalsxa(externaddr#12*{externaddr#12 <- `externaddr*`}), MEMS [], TABLES [], FUNCS $funcsxa(externaddr#13*{externaddr#13 <- `externaddr*`}) ++ (|s.FUNCS_store| + i_F#3)^(i_F#3<|func#11*{func#11 <- `func*`}|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D#2,)))^(i_D#2<|data#11*{data#11 <- `data*`}|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E#2,)))^(i_E#2<|elem#16*{elem#16 <- `elem*`}|){} + -- (wf_instr: `%`(CALL_instr(x#11),))?{x#11 <- `x?`} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(store : store, funcaddr : funcaddr, val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{s : store, funcaddr : nat, `val*` : val*, `t_1*` : valtype*, `t_2*` : valtype*}(s, funcaddr, val#2*{val#2 <- `val*`}) = `%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(val)*{val <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr($typeuse_deftype(s.FUNCS_store[funcaddr].TYPE_funcinst))]) + -- Expand: `%~~%`(s.FUNCS_store[funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1#7*{t_1#7 <- `t_1*`},), `%`_resulttype(t_2#11*{t_2#11 <- `t_2*`},))) + -- (Val_ok: `%|-%:%`(s, val#3, t_1#8))*{t_1#8 <- `t_1*`, val#3 <- `val*`} + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(val#4)*{val#4 <- `val*`} ++ [`REF.FUNC_ADDR`_instr(funcaddr) CALL_REF_instr($typeuse_deftype(s.FUNCS_store[funcaddr].TYPE_funcinst))]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1#9*{t_1#9 <- `t_1*`},), `%`_resulttype(t_2#12*{t_2#12 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{I : idctxt, `I'*` : I*}([I] ++ I'#1*{I'#1 <- `I'*`}) = I +++ $concat_idctxt(I'*{I' <- `I'*`}) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule _{I : I, `field**` : char**}: + `|-%:OK`(I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field*{field <- `field*`},))])))*{`field*` <- `field**`} + -- if ([?(`%`_name(field*{field <- `field*`},))*{`field*` <- `field**`}] = I.FIELDS_I) + -- wf_idctxt: `%`(I,) + -- (wf_name: `%`(`%`_name(field*{field <- `field*`},),))*{`field*` <- `field**`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(name : name, name : name, externtype : externtype) + | TAG(tagtype) + | GLOBAL(globaltype : globaltype, expr : expr) + | MEMORY(memtype) + | TABLE(tabletype : tabletype, expr : expr) + | FUNC(typeidx : typeidx, `local*` : local*, expr : expr) + | DATA(`byte*` : byte*, datamode : datamode) + | ELEM(reftype : reftype, `expr*` : expr*, elemmode : elemmode) + | START(funcidx) + | EXPORT(name : name, externidx : externidx) + +def $decl_data(data) : decl + def $decl_data{x0 : byte*, x1 : datamode}(DATA_data(x0, x1)) = DATA_decl(x0, x1) + +def $decl_elem(elem) : decl + def $decl_elem{x0 : reftype, x1 : expr*, x2 : elemmode}(ELEM_elem(x0, x1, x2)) = ELEM_decl(x0, x1, x2) + +def $decl_export(export) : decl + def $decl_export{x0 : name, x1 : externidx}(EXPORT_export(x0, x1)) = EXPORT_decl(x0, x1) + +def $decl_func(func) : decl + def $decl_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_decl(x0, x1, x2) + +def $decl_global(global) : decl + def $decl_global{x0 : globaltype, x1 : expr}(GLOBAL_global(x0, x1)) = GLOBAL_decl(x0, x1) + +def $decl_import(import) : decl + def $decl_import{x0 : name, x1 : name, x2 : externtype}(IMPORT_import(x0, x1, x2)) = IMPORT_decl(x0, x1, x2) + +def $decl_mem(mem) : decl + def $decl_mem{x : memtype}(MEMORY_mem(x)) = MEMORY_decl(x) + +def $decl_start(start) : decl + def $decl_start{x : funcidx}(START_start(x)) = START_decl(x) + +def $decl_table(table) : decl + def $decl_table{x0 : tabletype, x1 : expr}(TABLE_table(x0, x1)) = TABLE_decl(x0, x1) + +def $decl_tag(tag) : decl + def $decl_tag{x : tagtype}(TAG_tag(x)) = TAG_decl(x) + +def $decl_type(type) : decl + def $decl_type{x : rectype}(TYPE_type(x)) = TYPE_decl(x) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{name : name, name_0 : name, externtype : externtype}: + `%`(IMPORT_decl(name, name_0, externtype),) + -- wf_name: `%`(name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{globaltype : globaltype, expr : expr}: + `%`(GLOBAL_decl(globaltype, expr),) + -- wf_globaltype: `%`(globaltype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{tabletype : tabletype, expr : expr}: + `%`(TABLE_decl(tabletype, expr),) + -- wf_tabletype: `%`(tabletype,) + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{typeidx : typeidx, `local*` : local*, expr : expr}: + `%`(FUNC_decl(typeidx, `local*`, expr),) + -- wf_uN: `%%`(32, typeidx) + -- (wf_local: `%`(local,))*{local <- `local*`} + -- (wf_instr: `%`(expr,))*{expr <- expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{`byte*` : byte*, datamode : datamode}: + `%`(DATA_decl(`byte*`, datamode),) + -- (wf_byte: `%`(byte,))*{byte <- `byte*`} + -- wf_datamode: `%`(datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{reftype : reftype, `expr*` : expr*, elemmode : elemmode}: + `%`(ELEM_decl(reftype, `expr*`, elemmode),) + -- wf_reftype: `%`(reftype,) + -- (wf_instr: `%`(expr,))*{expr <- expr}*{expr <- `expr*`} + -- wf_elemmode: `%`(elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{name : name, externidx : externidx}: + `%`(EXPORT_decl(name, externidx),) + -- wf_name: `%`(name,) + -- wf_externidx: `%`(externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{var_0 : rectype, `decl'*` : decl*}([TYPE_decl(var_0)] ++ decl'#1*{decl'#1 <- `decl'*`}) = [TYPE_type(var_0)] ++ $typesd(decl'#2*{decl'#2 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#3*{decl'#3 <- `decl'*`}) = $typesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{name : name, name_0 : name, externtype : externtype, `decl'*` : decl*}([IMPORT_decl(name, name_0, externtype)] ++ decl'#4*{decl'#4 <- `decl'*`}) = [IMPORT_import(name, name_0, externtype)] ++ $importsd(decl'#5*{decl'#5 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#6*{decl'#6 <- `decl'*`}) = $importsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{var_0 : tagtype, `decl'*` : decl*}([TAG_decl(var_0)] ++ decl'#7*{decl'#7 <- `decl'*`}) = [TAG_tag(var_0)] ++ $tagsd(decl'#8*{decl'#8 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#9*{decl'#9 <- `decl'*`}) = $tagsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{globaltype : globaltype, expr : expr, `decl'*` : decl*}([GLOBAL_decl(globaltype, expr)] ++ decl'#10*{decl'#10 <- `decl'*`}) = [GLOBAL_global(globaltype, expr)] ++ $globalsd(decl'#11*{decl'#11 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#12*{decl'#12 <- `decl'*`}) = $globalsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{var_0 : memtype, `decl'*` : decl*}([MEMORY_decl(var_0)] ++ decl'#13*{decl'#13 <- `decl'*`}) = [MEMORY_mem(var_0)] ++ $memsd(decl'#14*{decl'#14 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#15*{decl'#15 <- `decl'*`}) = $memsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{tabletype : tabletype, expr : expr, `decl'*` : decl*}([TABLE_decl(tabletype, expr)] ++ decl'#16*{decl'#16 <- `decl'*`}) = [TABLE_table(tabletype, expr)] ++ $tablesd(decl'#17*{decl'#17 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#18*{decl'#18 <- `decl'*`}) = $tablesd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{typeidx : typeidx, `local*` : local*, expr : expr, `decl'*` : decl*}([FUNC_decl(typeidx, `local*`, expr)] ++ decl'#19*{decl'#19 <- `decl'*`}) = [FUNC_func(typeidx, `local*`, expr)] ++ $funcsd(decl'#20*{decl'#20 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#21*{decl'#21 <- `decl'*`}) = $funcsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{`byte*` : byte*, datamode : datamode, `decl'*` : decl*}([DATA_decl(`byte*`, datamode)] ++ decl'#22*{decl'#22 <- `decl'*`}) = [DATA_data(`byte*`, datamode)] ++ $datasd(decl'#23*{decl'#23 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#24*{decl'#24 <- `decl'*`}) = $datasd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{reftype : reftype, `expr*` : expr*, elemmode : elemmode, `decl'*` : decl*}([ELEM_decl(reftype, `expr*`, elemmode)] ++ decl'#25*{decl'#25 <- `decl'*`}) = [ELEM_elem(reftype, `expr*`, elemmode)] ++ $elemsd(decl'#26*{decl'#26 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#27*{decl'#27 <- `decl'*`}) = $elemsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{var_0 : funcidx, `decl'*` : decl*}([START_decl(var_0)] ++ decl'#28*{decl'#28 <- `decl'*`}) = [START_start(var_0)] ++ $startsd(decl'#29*{decl'#29 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#30*{decl'#30 <- `decl'*`}) = $startsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{name : name, externidx : externidx, `decl'*` : decl*}([EXPORT_decl(name, externidx)] ++ decl'#31*{decl'#31 <- `decl'*`}) = [EXPORT_export(name, externidx)] ++ $exportsd(decl'#32*{decl'#32 <- `decl'*`}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{decl : decl, `decl'*` : decl*}([decl] ++ decl'#33*{decl'#33 <- `decl'*`}) = $exportsd(decl'*{decl' <- `decl'*`}) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{`decl*` : decl*}(decl#1*{decl#1 <- `decl*`}) = true + -- if ($importsd(decl#2*{decl#2 <- `decl*`}) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{name : name, name_0 : name, externtype : externtype, `decl_1*` : decl*, `decl_2*` : decl*}(decl_1#1*{decl_1#1 <- `decl_1*`} ++ [IMPORT_decl(name, name_0, externtype)] ++ decl_2#1*{decl_2#1 <- `decl_2*`}) = (((((($importsd(decl_1#7*{decl_1#7 <- `decl_1*`}) = []) /\ ($tagsd(decl_1#6*{decl_1#6 <- `decl_1*`}) = [])) /\ ($globalsd(decl_1#5*{decl_1#5 <- `decl_1*`}) = [])) /\ ($memsd(decl_1#4*{decl_1#4 <- `decl_1*`}) = [])) /\ ($tablesd(decl_1#3*{decl_1#3 <- `decl_1*`}) = [])) /\ ($funcsd(decl_1#2*{decl_1#2 <- `decl_1*`}) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule _{C : context, n : n, `dt*` : deftype*, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt_F*` : deftype*, `ok*` : datatype*, `et*` : elemtype*, `lct*` : localtype*, `t**` : valtype**, `t'*?` : valtype*?, `x*` : idx*, m : m, `st*` : subtype*, C_0 : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}}) + -- if (C_0 = {TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- `dt_F*`, t_1 <- `t_1*`, t_2 <- `t_2*`} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- `et*`} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- `lct*`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t*{t <- `t*`},)))*{`t*` <- `t**`} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'*{t' <- `t'*`},)))?{`t'*` <- `t'*?`} + -- (if ($proj_uN_0(x).0 < |dt_F*{dt_F <- `dt_F*`}|))*{x <- `x*`} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt*{mt <- `mt*`}, TABLES tt*{tt <- `tt*`}, FUNCS dt_F*{dt_F <- `dt_F*`}, DATAS ok*{ok <- `ok*`}, ELEMS et*{et <- `et*`}, LOCALS lct*{lct <- `lct*`}, LABELS `%`_resulttype(t*{t <- `t*`},)*{`t*` <- `t**`}, RETURN `%`_resulttype(t'*{t' <- `t'*`},)?{`t'*` <- `t'*?`}, REFS x*{x <- `x*`}, RECS st^m{st <- `st*`}},) + -- wf_context: `%`({TYPES dt^n{dt <- `dt*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt^n{dt <- `dt*`}[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- `t_1*`, t_2 <- `t_2*`} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{s : store, val : val, t : valtype}: + `%|-%:%`(s, ?(val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_val: `%`(val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{s : store, t : valtype}: + `%|-%:%`(s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `b*` : byte*}: + `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- wf_store: `%`(s,) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE rt, REFS ref*{ref <- `ref*`}}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(s, xa, xt) + -- wf_store: `%`(s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `deftype*` : deftype*, `tagaddr*` : tagaddr*, `globaladdr*` : globaladdr*, `memaddr*` : memaddr*, `tableaddr*` : tableaddr*, `funcaddr*` : funcaddr*, `dataaddr*` : dataaddr*, `elemaddr*` : elemaddr*, `exportinst*` : exportinst*, `tagtype*` : tagtype*, `globaltype*` : globaltype*, `memtype*` : memtype*, `tabletype*` : tabletype*, `deftype_F*` : deftype*, `datatype*` : datatype*, `elemtype*` : elemtype*, k : nat, `subtype*` : subtype*}: + `%|-%:%`(s, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}}, {TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i 0) + -- (if (exportinst.ADDR_exportinst <- TAG_externaddr(tagaddr)*{tagaddr <- `tagaddr*`} ++ GLOBAL_externaddr(globaladdr)*{globaladdr <- `globaladdr*`} ++ MEM_externaddr(memaddr)*{memaddr <- `memaddr*`} ++ TABLE_externaddr(tableaddr)*{tableaddr <- `tableaddr*`} ++ FUNC_externaddr(funcaddr)*{funcaddr <- `funcaddr*`}))*{exportinst <- `exportinst*`} + -- if (k <= |funcaddr*{funcaddr <- `funcaddr*`}|) + -- wf_store: `%`(s,) + -- wf_moduleinst: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagaddr*{tagaddr <- `tagaddr*`}, GLOBALS globaladdr*{globaladdr <- `globaladdr*`}, MEMS memaddr*{memaddr <- `memaddr*`}, TABLES tableaddr*{tableaddr <- `tableaddr*`}, FUNCS funcaddr*{funcaddr <- `funcaddr*`}, DATAS dataaddr*{dataaddr <- `dataaddr*`}, ELEMS elemaddr*{elemaddr <- `elemaddr*`}, EXPORTS exportinst*{exportinst <- `exportinst*`}},) + -- wf_context: `%`({TYPES deftype*{deftype <- `deftype*`}, TAGS tagtype*{tagtype <- `tagtype*`}, GLOBALS globaltype*{globaltype <- `globaltype*`}, MEMS memtype*{memtype <- `memtype*`}, TABLES tabletype*{tabletype <- `tabletype*`}, FUNCS deftype_F*{deftype_F <- `deftype_F*`}, DATAS datatype*{datatype <- `datatype*`}, ELEMS elemtype*{elemtype <- `elemtype*`}, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{s : store, C : context, yy : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{s : store, C : context, yy : typeuse, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + `%;%|-%:%`(s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`},))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- `t'_2*`} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{s : store, C : context, ref : ref, rt : reftype}: + `%;%|-%:%`(s, C, $instr_ref(ref), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Ref_ok: `%|-%:%`(s, ref, rt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{s : store, C : context, n : n, `instr'*` : instr*, `instr*` : instr*, `t*` : valtype*, `t'*` : valtype*, `x'*` : idx*, `x*` : idx*}: + `%;%|-%:%`(s, C, `LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr'*{instr' <- `instr'*`}, `%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(n, instr'*{instr' <- `instr'*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'^n{t' <- `t'*`},), x'*{x' <- `x'*`}, `%`_resulttype(t*{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'^n{t' <- `t'*`},)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{s : store, C : context, n : n, f : frame, `instr*` : instr*, `t*` : valtype*, C' : context}: + `%;%|-%:%`(s, C, `FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},))) + -- Frame_ok: `%|-%:%`(s, f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t^n{t <- `t*`},))) + -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`},)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(n, f, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t^n{t <- `t*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{s : store, C : context, n : n, `catch*` : catch*, `instr*` : instr*, `t*` : valtype*, `x*` : idx*}: + `%;%|-%:%`(s, C, `HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(n, catch*{catch <- `catch*`}, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{s : store, C : context, `t_1*` : valtype*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{s : store, C : context}: + `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{s : store, C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Instr_ok2: `%;%|-%:%`(s, C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{s : store, C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- if (|`init*`| = |`t*`|) + -- if (|`init*`| = |`x_1*`|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- `x_1*`} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} + -- if ($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}) =/= ?()) + -- Instrs_ok2: `%;%|-%:%`(s, !($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`})), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- `instr_1*`} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- `instr_2*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- (wf_localtype: `%`(`%%`_localtype(init, t),))*{init <- `init*`, t <- `t*`} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- `t*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{s : store, C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it') + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{s : store, C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`},)) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule _{s : store, C : context, `instr*` : instr*, `t*` : valtype*}: + `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- Instrs_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},))) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t*{t <- `t*`},)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, jt : tagtype}: + `%|-%:%`(s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `mut?` : mut?, t : valtype, val : val}: + `%|-%:%`(s, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut?{mut <- `mut?`}, t)) + -- Val_ok: `%|-%:%`(s, val, t) + -- wf_store: `%`(s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut?{mut <- `mut?`}, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, `b*` : byte*}: + `%|-%:%`(s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}))) + -- if (|b*{b <- `b*`}| = (n * (64 * $Ki))) + -- wf_store: `%`(s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*}: + `%|-%:%`(s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt)) + -- if (|ref*{ref <- `ref*`}| = n) + -- (Ref_ok: `%|-%:%`(s, ref, rt))*{ref <- `ref*`} + -- wf_store: `%`(s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, moduleinst : moduleinst, func : func, C : context, dt' : deftype}: + `%|-%:%`(s, {TYPE dt, MODULE moduleinst, CODE $funccode_func(func)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(s, moduleinst, C) + -- Func_ok: `%|-%:%`(C, func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE moduleinst, CODE $funccode_func(func)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`zt*`|) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`, zt <- `zt*`} + -- wf_store: `%`(s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, dt : deftype, `fv*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%|-%:OK`(s, {TYPE dt, FIELDS fv*{fv <- `fv*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- (Fieldval_ok: `%|-%:%`(s, fv, zt))*{fv <- `fv*`} + -- wf_store: `%`(s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, ta : tagaddr, `val*` : val*, dt : deftype, `t*` : valtype*}: + `%|-%:OK`(s, {TAG ta, FIELDS val*{val <- `val*`}}) + -- if (ta < |s.TAGS_store|) + -- if ($typeuse_deftype(dt) = s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) + -- if (|`t*`| = |`val*`|) + -- (Val_ok: `%|-%:%`(s, val, t))*{t <- `t*`, val <- `val*`} + -- wf_store: `%`(s,) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, s, fv') + -- ImmutReachable: `%>>_%%`(fv', s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule `ref.struct`{a : addr, s : store, i : nat, `ft*` : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, s.STRUCTS_store[a].FIELDS_structinst[i]) + -- if (i < |s.STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |s.STRUCTS_store|) + -- Expand: `%~~%`(s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) + -- if (i < |ft*{ft <- `ft*`}|) + -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule `ref.array`{a : addr, s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- if (i < |s.ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |s.ARRAYS_store|) + -- Expand: `%~~%`(s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule `ref.exn`{a : addr, s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, $fieldval_val(s.EXNS_store[a].FIELDS_exninst[i])) + -- if (i < |s.EXNS_store[a].FIELDS_exninst|) + -- if (a < |s.EXNS_store|) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule `ref.extern`{ref : ref, s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, $fieldval_ref(ref)) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $NotImmutReachable(fieldval : fieldval, store : store, fieldval : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $NotImmutReachable{fv_1 : fieldval, s : store, fv_2 : fieldval}(fv_1, s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{fv_1 : fieldval, s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, `taginst*` : taginst*, `tagtype*` : tagtype*, `globalinst*` : globalinst*, `globaltype*` : globaltype*, `meminst*` : meminst*, `memtype*` : memtype*, `tableinst*` : tableinst*, `tabletype*` : tabletype*, `deftype*` : deftype*, `funcinst*` : funcinst*, `datainst*` : datainst*, `datatype*` : datatype*, `eleminst*` : eleminst*, `elemtype*` : elemtype*, `structinst*` : structinst*, `arrayinst*` : arrayinst*, `exninst*` : exninst*}: + `|-%:OK`(s,) + -- if (|`taginst*`| = |`tagtype*`|) + -- (Taginst_ok: `%|-%:%`(s, taginst, tagtype))*{taginst <- `taginst*`, tagtype <- `tagtype*`} + -- if (|`globalinst*`| = |`globaltype*`|) + -- (Globalinst_ok: `%|-%:%`(s, globalinst, globaltype))*{globalinst <- `globalinst*`, globaltype <- `globaltype*`} + -- if (|`meminst*`| = |`memtype*`|) + -- (Meminst_ok: `%|-%:%`(s, meminst, memtype))*{meminst <- `meminst*`, memtype <- `memtype*`} + -- if (|`tableinst*`| = |`tabletype*`|) + -- (Tableinst_ok: `%|-%:%`(s, tableinst, tabletype))*{tableinst <- `tableinst*`, tabletype <- `tabletype*`} + -- if (|`deftype*`| = |`funcinst*`|) + -- (Funcinst_ok: `%|-%:%`(s, funcinst, deftype))*{deftype <- `deftype*`, funcinst <- `funcinst*`} + -- if (|`datainst*`| = |`datatype*`|) + -- (Datainst_ok: `%|-%:%`(s, datainst, datatype))*{datainst <- `datainst*`, datatype <- `datatype*`} + -- if (|`eleminst*`| = |`elemtype*`|) + -- (Eleminst_ok: `%|-%:%`(s, eleminst, elemtype))*{eleminst <- `eleminst*`, elemtype <- `elemtype*`} + -- (Structinst_ok: `%|-%:OK`(s, structinst))*{structinst <- `structinst*`} + -- (Arrayinst_ok: `%|-%:OK`(s, arrayinst))*{arrayinst <- `arrayinst*`} + -- (Exninst_ok: `%|-%:OK`(s, exninst))*{exninst <- `exninst*`} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst*{exninst <- `exninst*`}|){} + -- if (s = {TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}}) + -- wf_store: `%`(s,) + -- (wf_typeuse: `%`(tagtype,))*{tagtype <- `tagtype*`} + -- (wf_globaltype: `%`(globaltype,))*{globaltype <- `globaltype*`} + -- (wf_memtype: `%`(memtype,))*{memtype <- `memtype*`} + -- (wf_tabletype: `%`(tabletype,))*{tabletype <- `tabletype*`} + -- (wf_reftype: `%`(elemtype,))*{elemtype <- `elemtype*`} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst*{structinst <- `structinst*`}|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst*{arrayinst <- `arrayinst*`}|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst*{exninst <- `exninst*`}|){} + -- wf_store: `%`({TAGS taginst*{taginst <- `taginst*`}, GLOBALS globalinst*{globalinst <- `globalinst*`}, MEMS meminst*{meminst <- `meminst*`}, TABLES tableinst*{tableinst <- `tableinst*`}, FUNCS funcinst*{funcinst <- `funcinst*`}, DATAS datainst*{datainst <- `datainst*`}, ELEMS eleminst*{eleminst <- `eleminst*`}, STRUCTS structinst*{structinst <- `structinst*`}, ARRAYS arrayinst*{arrayinst <- `arrayinst*`}, EXNS exninst*{exninst <- `exninst*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`mut?` : mut?, t : valtype, val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val}, {TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'}) + -- if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut?{mut <- `mut?`}, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, `b*` : byte*, n' : n, `b'*` : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}}) + -- if (n <= n') + -- if (|b*{b <- `b*`}| <= |b'*{b' <- `b'*`}|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`})), BYTES b*{b <- `b*`}},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`})), BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{at : addrtype, n : n, `m?` : m?, rt : reftype, `ref*` : ref*, n' : n, `ref'*` : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}}) + -- if (n <= n') + -- if (|ref*{ref <- `ref*`}| <= |ref'*{ref' <- `ref'*`}|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n,), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref*{ref <- `ref*`}},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(m,)?{m <- `m?`}), rt), REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{`b*` : byte*, `b'*` : byte*}: + `%<=%`({BYTES b*{b <- `b*`}}, {BYTES b'*{b' <- `b'*`}}) + -- if ((b*{b <- `b*`} = b'*{b' <- `b'*`}) \/ (b'*{b' <- `b'*`} = [])) + -- wf_datainst: `%`({BYTES b*{b <- `b*`}},) + -- wf_datainst: `%`({BYTES b'*{b' <- `b'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{rt : reftype, `ref*` : ref*, `ref'*` : ref*}: + `%<=%`({TYPE rt, REFS ref*{ref <- `ref*`}}, {TYPE rt, REFS ref'*{ref' <- `ref'*`}}) + -- if ((ref*{ref <- `ref*`} = ref'*{ref' <- `ref'*`}) \/ (ref'*{ref' <- `ref'*`} = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref*{ref <- `ref*`}},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'*{ref' <- `ref'*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?*` : mut?*, `zt*` : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},))) + -- if (|`fv*`| = |`fv'*`|) + -- if (|`fv*`| = |`mut?*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`, `mut?` <- `mut?*`} + -- wf_structinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{dt : deftype, `fv*` : fieldval*, `fv'*` : fieldval*, `mut?` : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv*{fv <- `fv*`}}, {TYPE dt, FIELDS fv'*{fv' <- `fv'*`}}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) + -- if (|`fv*`| = |`fv'*`|) + -- (if ((mut?{mut <- `mut?`} = ?(MUT_mut)) \/ (fv = fv')))*{fv <- `fv*`, fv' <- `fv'*`} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv*{fv <- `fv*`}},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'*{fv' <- `fv'*`}},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{ta : tagaddr, `val*` : val*}: + `%<=%`({TAG ta, FIELDS val*{val <- `val*`}}, {TAG ta, FIELDS val*{val <- `val*`}}) + -- wf_exninst: `%`({TAG ta, FIELDS val*{val <- `val*`}},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, s' : store}: + `%<=%`(s, s') + -- (if (a < |s.TAGS_store|))^(a<|s.TAGS_store|){} + -- (if (a < |s'.TAGS_store|))^(a<|s.TAGS_store|){} + -- (Extend_taginst: `%<=%`(s.TAGS_store[a], s'.TAGS_store[a]))^(a<|s.TAGS_store|){} + -- (if (a < |s.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (if (a < |s'.GLOBALS_store|))^(a<|s.GLOBALS_store|){} + -- (Extend_globalinst: `%<=%`(s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|s.GLOBALS_store|){} + -- (if (a < |s.MEMS_store|))^(a<|s.MEMS_store|){} + -- (if (a < |s'.MEMS_store|))^(a<|s.MEMS_store|){} + -- (Extend_meminst: `%<=%`(s.MEMS_store[a], s'.MEMS_store[a]))^(a<|s.MEMS_store|){} + -- (if (a < |s.TABLES_store|))^(a<|s.TABLES_store|){} + -- (if (a < |s'.TABLES_store|))^(a<|s.TABLES_store|){} + -- (Extend_tableinst: `%<=%`(s.TABLES_store[a], s'.TABLES_store[a]))^(a<|s.TABLES_store|){} + -- (if (a < |s.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (if (a < |s'.FUNCS_store|))^(a<|s.FUNCS_store|){} + -- (Extend_funcinst: `%<=%`(s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|s.FUNCS_store|){} + -- (if (a < |s.DATAS_store|))^(a<|s.DATAS_store|){} + -- (if (a < |s'.DATAS_store|))^(a<|s.DATAS_store|){} + -- (Extend_datainst: `%<=%`(s.DATAS_store[a], s'.DATAS_store[a]))^(a<|s.DATAS_store|){} + -- (if (a < |s.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (if (a < |s'.ELEMS_store|))^(a<|s.ELEMS_store|){} + -- (Extend_eleminst: `%<=%`(s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|s.ELEMS_store|){} + -- (if (a < |s.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (if (a < |s'.STRUCTS_store|))^(a<|s.STRUCTS_store|){} + -- (Extend_structinst: `%<=%`(s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|s.STRUCTS_store|){} + -- (if (a < |s.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (if (a < |s'.ARRAYS_store|))^(a<|s.ARRAYS_store|){} + -- (Extend_arrayinst: `%<=%`(s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|s.ARRAYS_store|){} + -- (if (a < |s.EXNS_store|))^(a<|s.EXNS_store|){} + -- (if (a < |s'.EXNS_store|))^(a<|s.EXNS_store|){} + -- (Extend_exninst: `%<=%`(s.EXNS_store[a], s'.EXNS_store[a]))^(a<|s.EXNS_store|){} + -- wf_store: `%`(s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, C : context}: + `|-%:%`(`%;%`_state(s, f), C) + -- Store_ok: `|-%:OK`(s,) + -- Frame_ok: `%|-%:%`(s, f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule _{s : store, f : frame, `instr*` : instr*, `t*` : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}), `%`_resulttype(t*{t <- `t*`},)) + -- State_ok: `|-%:%`(`%;%`_state(s, f), C) + -- Expr_ok2: `%;%|-%:%`(s, C, instr*{instr <- `instr*`}, `%`_resulttype(t*{t <- `t*`},)) + -- (wf_valtype: `%`(t,))*{t <- `t*`} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s, f), instr*{instr <- `instr*`}),) + -- wf_state: `%`(`%;%`_state(s, f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + `...` recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule _{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule `i32.add`{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule `global.get`{C : context, x : idx, t : valtype, mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, blocktype : blocktype, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:%`(C, [BLOCK_instr(blocktype, instr*{instr <- `instr*`})], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- Blocktype_ok: `%|-%:%`(C, blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(blocktype, instr*{instr <- `instr*`}),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule 4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(n : n, `instr*` : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{n : n, `instr*` : instr*}: + `%`(`LABEL_%{%}`_label(n, `instr*`),) + -- (wf_instr: `%`(instr,))*{instr <- `instr*`} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(n : n, frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{n : n, frame : frame}: + `%`(`FRAME_%{%}`_callframe(n, frame),) + -- wf_frame: `%`(frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, store : store, X : X, Y : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, store : store, X*, Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, s : store}(syntax X, syntax Y, s, [], []) = (s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, s : store, X : X, `X'*` : X*, Y : Y, `Y'*` : Y*}(syntax X, syntax Y, s, [X] ++ X'#1*{X'#1 <- `X'*`}, [Y] ++ Y'#1*{Y'#1 <- `Y'*`}) = (s_2, [a] ++ a'*{a' <- `a'*`}) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, s, X, Y) + -- let{s_2 : store, `a'*` : addr*} (s_2, a'#1*{a'#1 <- `a'*`}) = $allocXs(syntax X, syntax Y, s_1, X'#2*{X'#2 <- `X'*`}, Y'#2*{Y'#2 <- `Y'*`}) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{n : n} `%`_byte(n,):Bbyte => `%`_uN(n,) + -- if ((n < (2 ^ 7)) /\ (n < (2 ^ N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{m : m, n : n} {{`%`_byte(n,):Bbyte} {`%`_uN(m,):BuN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * m) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN((n : nat <:> int),) + -- if ((n < (2 ^ 6)) /\ (n < (2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{n : n} `%`_byte(n,):Bbyte => `%`_sN(((n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= n) /\ (n < (2 ^ 7))) /\ ((n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, n : n} {{`%`_byte(n,):Bbyte} {i:BsN((((N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((n >= (2 ^ 7)) /\ (N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`b*` : byte*} b*{b <- `b*`}:Bbyte^(((N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(N, b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{n : n, `el*` : el*} {{`%`_u32(n,):Bu32} {el:BX^n{el <- `el*`}}} => el^n{el <- `el*`} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{name : name, `b*` : byte*} b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte) => name + -- if ($utf8($proj_name_0(name).0) = b*{b <- `b*`}) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t*` : valtype*} t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t*{t <- `t*`},) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, zt : storagetype} {{zt:Bstoragetype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_fieldtype(mut?{mut <- `mut?`}, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`ft*` : fieldtype*} {{0x5F} {ft*{ft <- `ft*`}:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`st*` : subtype*} {{0x4E} {st*{st <- `st*`}:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st*{st <- `st*`},)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x00} {`%`_u64(n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x01} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n} {{0x04} {`%`_u64(n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{n : n, m : m} {{0x05} {`%`_u64(n,):Bu64} {`%`_u64(m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{`mut?` : mut?, t : valtype} {{t:Bvaltype} {mut?{mut <- `mut?`}:Bmut}} => `%%`_globaltype(mut?{mut <- `mut?`}, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{n : n, m : m} {{`%`_u32(n,):Bu32} {`%`_u64(m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)}) + -- if (n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, n : n, m : m} {{`%`_u32(n,):Bu32} {x:Bmemidx} {`%`_u64(m,):Bu64}} => (x, {ALIGN `%`_u32((((n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(m,)}) + -- if (((2 ^ 6) <= n) /\ (n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{`t*` : valtype*} {{0x1C} {t*{t <- `t*`}:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t*{t <- `t*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, `in*` : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => BLOCK_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, `in*` : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => LOOP_instr(bt, in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, `in*` : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- `in*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in*{in <- `in*`}, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- `in_1*`}} {0x05} {in_2:Binstr*{in_2 <- `in_2*`}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{`l*` : labelidx*, l_n : labelidx} {{0x0E} {l*{l <- `l*`}:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l*{l <- `l*`}, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*} {{0x1F} {bt:Bblocktype} {c*{c <- `c*`}:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- `in*`}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- `l*`}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{`in*` : instr*} {{in:Binstr*{in <- `in*`}} {0x0B}} => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`en*` : en*, len : nat} {{`%`_byte(N,):Bbyte} {`%`_u32(len,):Bu32} {en*{en <- `en*`}:BX}} => en*{en <- `en*`} + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ty*` : type*} ty*{ty <- `ty*`}:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty*{ty <- `ty*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`im*` : import*} im*{im <- `im*`}:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im*{im <- `im*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`x*` : idx*} x*{x <- `x*`}:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x*{x <- `x*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tab*` : table*} tab*{tab <- `tab*`}:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab*{tab <- `tab*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`mem*` : mem*} mem*{mem <- `mem*`}:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem*{mem <- `mem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`glob*` : global*} glob*{glob <- `glob*`}:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob*{glob <- `glob*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`ex*` : export*} ex*{ex <- `ex*`}:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex*{ex <- `ex*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{startopt : startopt} startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`y*` : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `y*` : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y*{y <- `y*`}:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- `y*`}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`e*` : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e*{e <- `e*`}, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, `e*` : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e*{e <- `e*`}:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`elem*` : elem*} elem*{elem <- `elem*`}:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem*{elem <- `elem*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, n : n} {{`%`_u32(n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`loc**` : local**, e : expr} {{loc*{loc <- `loc*`}*{`loc*` <- `loc**`}:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e) + -- if (|$concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code : code, len : nat} {{`%`_u32(len,):Bu32} {code:Bfunc}} => code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`code*` : code*} code*{code <- `code*`}:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code*{code <- `code*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*} {{`%`_u32(1,):Bu32} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`b*` : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b*{b <- `b*`}:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`data*` : data*} data*{data <- `data*`}:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data*{data <- `data*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{n : n} `%`_u32(n,):Bu32 => [`%`_u32(n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nopt : nopt} nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`tag*` : tag*} tag*{tag <- `tag*`}:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag*{tag <- `tag*`} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `typeidx*` : typeidx*, `n?` : n?, `expr*` : expr*, `local**` : local**} {Bmagic Bversion {Bcustomsec*{}} {type*{type <- `type*`}:Btypesec} {Bcustomsec*{}} {import*{import <- `import*`}:Bimportsec} {Bcustomsec*{}} {typeidx*{typeidx <- `typeidx*`}:Bfuncsec} {Bcustomsec*{}} {table*{table <- `table*`}:Btablesec} {Bcustomsec*{}} {mem*{mem <- `mem*`}:Bmemsec} {Bcustomsec*{}} {tag*{tag <- `tag*`}:Btagsec} {Bcustomsec*{}} {global*{global <- `global*`}:Bglobalsec} {Bcustomsec*{}} {export*{export <- `export*`}:Bexportsec} {Bcustomsec*{}} {start?{start <- `start?`}:Bstartsec} {Bcustomsec*{}} {elem*{elem <- `elem*`}:Belemsec} {Bcustomsec*{}} {`%`_u32(n,)?{n <- `n?`}:Bdatacntsec} {Bcustomsec*{}} {(local*{local <- `local*`}, expr)*{expr <- `expr*`, `local*` <- `local**`}:Bcodesec} {Bcustomsec*{}} {data*{data <- `data*`}:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- (if (n = |data*{data <- `data*`}|))?{n <- `n?`} + -- if ((n?{n <- `n?`} =/= ?()) \/ ($dataidx_funcs(func*{func <- `func*`}) = [])) + -- (if (func = FUNC_func(typeidx, local*{local <- `local*`}, expr)))*{expr <- `expr*`, func <- `func*`, `local*` <- `local**`, typeidx <- `typeidx*`} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{n : n, h : nat} {{n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"\\u{"} {n:Thexnum} {"}"}} => `%`_char(n,) + -- if ((n < 55296) \/ ((57344 <= n) /\ (n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`b**` : byte**} {{"\""} {b*{b <- `b*`}:Tstringelem*{`b*` <- `b**`}} {"\""}} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + -- if (|$concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`})| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*, `b*` : byte*} b*{b <- `b*`}:Tstring => `%`_name(c*{c <- `c*`},) + -- if (b*{b <- `b*`} = $utf8(c*{c <- `c*`})) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {c*{c <- `c*`}:Tidchar+{}}} => `%`_name(c*{c <- `c*`},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`c*` : char*} {{"$"} {`%`_name(c*{c <- `c*`},):Tname}} => `%`_name(c*{c <- `c*`},) + -- if (|c*{c <- `c*`}| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{n : n, d : nat} {{n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} n:Tnum => `%`_uN(n,) + -- if (n < (2 ^ N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"0x"} {n:Thexnum}} => `%`_uN(n,) + -- if (n < (2 ^ N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{s : int, n : n} {{s:Tsign} {`%`_uN(n,):TuN(N)}} => `%`_sN((s * (n : nat <:> int)),) + -- if ((- ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (s * (n : nat <:> int))) /\ ((s * (n : nat <:> int)) < ((2 ^ (((N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} `%`_uN(n,):TuN(N) => `%`_iN(n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(N) => `%`_iN($inv_signed_(N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(N, q) + -- if ($ieee_(N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{n : n} {{"nan:0x"} {n:Thexnum}} => NAN_fNmag(n,) + -- if ((1 <= n) /\ (n < (2 ^ !($signif(N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`el*` : el*} el:TX*{el <- `el*`} => el*{el <- `el*`} + -- if (|el*{el <- `el*`}| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`null?` : null?, ht : heaptype} {{"("} {"ref"} {null?{null <- `null?`}:Tnull?{}} {ht:Theaptype_(I)} {")"}} => REF_reftype(null?{null <- `null?`}, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(I) => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, `id?` : char?} {{"("} {"field"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {ft:Tfieldtype_(I)} {")"}} => (ft, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, `id?` : char?} {{"("} {"param"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => (t, ?(`%`_name(lift(id?{id <- `id?`}),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`ft*` : fieldtype*, `id?*` : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id?{id <- `id?`}),)))*{ft <- `ft*`, `id?` <- `id?*`}:Tlist(syntax (fieldtype, name?), grammar Tfield_(I))} {")"}} => (STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`t_1*` : valtype*, `t_2*` : valtype*, `id?*` : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tlist(syntax (valtype, name?), grammar Tparam_(I))} {t_2*{t_2 <- `t_2*`}:Tlist(syntax valtype, grammar Tresult_(I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`fin?` : final?, `x*` : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin?{fin <- `fin?`}:Tfinal?{}} {x*{x <- `x*`}:Tlist(syntax typeidx, grammar Ttypeidx_(I))} {(ct, I'):Tcomptype_(I)} {")"}} => (SUB_subtype(fin?{fin <- `fin?`}, _IDX_typeuse(x)*{x <- `x*`}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, `id?` : char?} {{"("} {"type"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(st, I'):Tsubtype_(I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id?{id <- `id?`}),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{`st*` : subtype*, `I'*` : I*} {{"("} {"rec"} {(st, I')*{I' <- `I'*`, st <- `st*`}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(I))} {")"}} => (REC_rectype(`%`_list(st*{st <- `st*`},)), $concat_idctxt(I'*{I' <- `I'*`})) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n} `%`_u64(n,):Tu64 => `[%..%]`_limits(`%`_u64(n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{n : n, m : m} {{`%`_u64(n,):Tu64} {`%`_u64(m,):Tu64}} => `[%..%]`_limits(`%`_u64(n,), ?(`%`_u64(m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `st*` : subtype*, i : n, `t_1*` : valtype*, `t_2*` : valtype*} {{"("} {"type"} {x:Ttypeidx_(I)} {")"}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1*{t_1 <- `t_1*`}|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, `id?*` : char?*, `t_1*` : valtype*, `t_2*` : valtype*, `st*` : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(I)} {")"} {(t_1, ?(`%`_name(lift(id?{id <- `id?`}),)))*{`id?` <- `id?*`, t_1 <- `t_1*`}:Tparam_(I)*{}} {t_2*{t_2 <- `t_2*`}:Tresult_(I)*{}}} => (x, I') + -- if (I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st*{st <- `st*`},)), i))) + -- if (st*{st <- `st*`}[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id?{id <- `id?`}),))*{`id?` <- `id?*`}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, `id?` : char?} {{"("} {"tag"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {jt:Ttagtype_(I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, `id?` : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I) + -- if ~ (?(id) <- I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t?` : valtype?} t?{t <- `t?`}:Tresult_(I)?{} => _RESULT_blocktype(t?{t <- `t?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(I)} {l:Tlabelidx_(I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{"align="} {`%`_u64(m,):Tu64}} => `%`_u32(n,) + -- if (m = (2 ^ n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n} eps => `%`_u32(n,) + -- if (N = (2 ^ n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{m : m} {{"offset="} {`%`_u64(m,):Tu64}} => `%`_u64(m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{n : n, m : m} {{`%`_u64(m,):Toffset} {`%`_u32(n,):Talign_(N)}} => {ALIGN `%`_u32(n,), OFFSET `%`_u64(m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`t*?` : valtype*?} {{"select"} {t*{t <- `t*`}:Tresult_(I)*{}?{`t*` <- `t*?`}}} => SELECT_instr(t*{t <- `t*`}?{`t*` <- `t*?`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`l*` : labelidx*, l' : labelidx} {{"br_table"} {l*{l <- `l*`}:Tlabelidx_(I)*{}} {l':Tlabelidx_(I)}} => BR_TABLE_instr(l*{l <- `l*`}, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(I)} {rt_1:Treftype_(I)} {rt_2:Treftype_(I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(I)} {(y, I'):Ttypeuse_(I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(I)} {x_2:Ttableidx_(I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(I)} {y:Telemidx_(I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(I)} {x_2:Tmemidx_(I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(I)} {y:Tdataidx_(I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(I)} {i:Tfieldidx__(I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, n : n} {{"array.new_fixed"} {x:Ttypeidx_(I)} {`%`_u32(n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(I)} {x_2:Ttypeidx_(I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(I)} {y:Tdataidx_(I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(I)} {y:Telemidx_(I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u8*} {{"v128.const"} {"i8x16"} {c*{c <- `c*`}:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u16*} {{"v128.const"} {"i16x8"} {c*{c <- `c*`}:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u32*} {{"v128.const"} {"i32x4"} {c*{c <- `c*`}:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : u64*} {{"v128.const"} {"i64x2"} {c*{c <- `c*`}:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f32*} {{"v128.const"} {"f32x4"} {c*{c <- `c*`}:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`c*` : f64*} {{"v128.const"} {"f64x2"} {c*{c <- `c*`}:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- `c*`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`i*` : laneidx*} {{"i8x16.shuffle"} {i*{i <- `i*`}:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i*{i <- `i*`}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{`in*` : instr*} in*{in <- `in*`}:Tinstr_(I)*{} => in*{in <- `in*`} + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{`in**` : instr**} in*{in <- `in*`}*{`in*` <- `in**`}:Tfoldedinstr_(I)*{} => $concat_(syntax instr, in*{in <- `in*`}*{`in*` <- `in**`}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"block"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => BLOCK_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"loop"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => LOOP_instr(bt, in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, `in_1*` : instr*, `in_2*` : instr*, `id?` : char?, I' : I, `id_1?` : char?, `id_2?` : char?} {{"if"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {in_1*{in_1 <- `in_1*`}:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1?{id_1 <- `id_1?`}),)):Tid?{}} {in_2*{in_2 <- `in_2*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2?{id_2 <- `id_2?`}),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1*{in_1 <- `in_1*`}, in_2*{in_2 <- `in_2*`}) + -- if (((id_1?{id_1 <- `id_1?`} = ?()) \/ (id_1?{id_1 <- `id_1?`} = id?{id <- `id?`})) /\ ((id_2?{id_2 <- `id_2?`} = ?()) \/ (id_2?{id_2 <- `id_2?`} = id?{id <- `id?`}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, `c*` : catch*, `in*` : instr*, `id?` : char?, I' : I, `id'?` : char?} {{"try_table"} {(?(`%`_name(lift(id?{id <- `id?`}),)), I'):Tlabel_(I)} {bt:Tblocktype_(I)} {c*{c <- `c*`}:Tcatch_(I)*{}} {in*{in <- `in*`}:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'?{id' <- `id'?`}),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c*{c <- `c*`},), in*{in <- `in*`}) + -- if ((id'?{id' <- `id'?`} = ?()) \/ (id'?{id' <- `id'?`} = id?{id <- `id?`})) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{`in*` : instr*} in*{in <- `in*`}:Tinstrs_(I) => in*{in <- `in*`} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, n : n, `st*` : subtype*} (qt, I'):Trectype_(I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st^n{st <- `st*`},))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id?{id <- `id?`}),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, `id?` : char?} {{"("} {"global"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {gt:Tglobaltype_(I)} {e:Texpr_(I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id?{id <- `id?`}),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, `id?` : char?} {{"("} {"memory"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {mt:Tmemtype_(I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id?{id <- `id?`}),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, `id?` : char?} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {tt:Ttabletype_(I)} {e:Texpr_(I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`}),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, `id?` : char?} {{"("} {"local"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {t:Tvaltype_(I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id?{id <- `id?`}),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, `loc**` : local**, e : expr, `id?` : char?, I_1 : I, `I_2*` : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(x, I_1):Ttypeuse_(I)} {(loc*{loc <- `loc*`}, I_2):Tlocal_(I)*{I_2 <- `I_2*`, `loc*` <- `loc**`}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc*{loc <- `loc*`}*{`loc*` <- `loc**`}), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`}),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = I +++ I_1 +++ $concat_idctxt(I_2*{I_2 <- `I_2*`})) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b**` : byte**} b*{b <- `b*`}*{`b*` <- `b**`}:Tstring*{} => $concat_(syntax byte, b*{b <- `b*`}*{`b*` <- `b**`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`b*` : byte*, x : idx, e : expr, `id?` : char?} {{"("} {"data"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Tmemuse_(I)} {e:Toffsetexpr_(I)} {b*{b <- `b*`}:Tdatastring} {")"}} => (DATA_data(b*{b <- `b*`}, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id?{id <- `id?`}),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*} {{rt:Treftype_(I)} {e*{e <- `e*`}:Tlist(syntax expr, grammar Telemexpr_(I))}} => (rt, e*{e <- `e*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, x : idx, e' : expr, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {x:Ttableuse_(I)} {e':Toffsetexpr_(I)} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, `e*` : expr*, `id?` : char?} {{"("} {"elem"} {?(`%`_name(lift(id?{id <- `id?`}),)):Tid?{}} {"declare"} {(rt, e*{e <- `e*`}):Telemlist_(I)} {")"}} => (ELEM_elem(rt, e*{e <- `e*`}, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id?{id <- `id?`}),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(I)} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(I)} {Texpr_(I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(I)} {"("} {"elem"} {Telemlist_(I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(I)} {Tlocal_(I)*{}} {Texpr_(I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(I) => ($decl_type(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(I) => ($decl_import(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(I) => ($decl_tag(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(I) => ($decl_global(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(I) => ($decl_mem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(I) => ($decl_table(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(I) => ($decl_func(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(I) => ($decl_data(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(I) => ($decl_elem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(I) => ($decl_start(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(I) => ($decl_export(``.0), ``.1) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, `I*` : I*, `decl*` : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(decl, I)*{I <- `I*`, decl <- `decl*`}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type*{type <- `type*`},), `%`_list(import*{import <- `import*`},), `%`_list(tag*{tag <- `tag*`},), `%`_list(global*{global <- `global*`},), `%`_list(mem*{mem <- `mem*`},), `%`_list(table*{table <- `table*`},), `%`_list(func*{func <- `func*`},), `%`_list(data*{data <- `data*`},), `%`_list(elem*{elem <- `elem*`},), start?{start <- `start?`}, `%`_list(export*{export <- `export*`},)) + -- if (I' = $concat_idctxt(I*{I <- `I*`})) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type*{type <- `type*`} = $typesd(decl*{decl <- `decl*`})) + -- if (import*{import <- `import*`} = $importsd(decl*{decl <- `decl*`})) + -- if (tag*{tag <- `tag*`} = $tagsd(decl*{decl <- `decl*`})) + -- if (global*{global <- `global*`} = $globalsd(decl*{decl <- `decl*`})) + -- if (mem*{mem <- `mem*`} = $memsd(decl*{decl <- `decl*`})) + -- if (table*{table <- `table*`} = $tablesd(decl*{decl <- `decl*`})) + -- if (func*{func <- `func*`} = $funcsd(decl*{decl <- `decl*`})) + -- if (data*{data <- `data*`} = $datasd(decl*{decl <- `decl*`})) + -- if (elem*{elem <- `elem*`} = $elemsd(decl*{decl <- `decl*`})) + -- if (lift(start?{start <- `start?`}) = $startsd(decl*{decl <- `decl*`})) + -- if (export*{export <- `export*`} = $exportsd(decl*{decl <- `decl*`})) + -- if $ordered(decl*{decl <- `decl*`}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/specification.exp/13-improve-ids.il b/spectec/test-middlend/specification.exp/13-improve-ids.il new file mode 100644 index 0000000000..fbd77afe58 --- /dev/null +++ b/spectec/test-middlend/specification.exp/13-improve-ids.il @@ -0,0 +1,20177 @@ + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax N = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax K = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax n = nat + +;; ../../../../specification/wasm-3.0/0.1-aux.vars.spectec +syntax m = nat + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +def $min(nat : nat, nat_0 : nat) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec + def $min{i : nat, j : nat}(i, j) = (if (i <= j) then i else j) + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:9.1-9.56 +def $sum(var_0 : nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:10.1-10.18 + def $sum([]) = 0 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:11.1-11.35 + def $sum{v_n : nat, n'_lst : n*}([v_n] ++ n'_lst) = (v_n + $sum(n'_lst)) +} + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:13.1-13.57 +def $prod(var_0 : nat*) : nat + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:14.1-14.19 + def $prod([]) = 1 + ;; ../../../../specification/wasm-3.0/0.2-aux.num.spectec:15.1-15.37 + def $prod{v_n : nat, n'_lst : n*}([v_n] ++ n'_lst) = (v_n * $prod(n'_lst)) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $opt_(syntax X, var_0 : X*) : X?? + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X}(syntax X, []) = ?(?()) + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $opt_{syntax X, w : X}(syntax X, [w]) = ?(?(w)) + def $opt_{syntax X, x1 : X*}(syntax X, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:14.1-14.82 +def $concat_(syntax X, var_0 : X**) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:15.1-15.34 + def $concat_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:16.1-16.64 + def $concat_{syntax X, w_lst : X*, w'_lst_lst : X**}(syntax X, [w_lst] ++ w'_lst_lst) = w_lst ++ $concat_(syntax X, w'_lst_lst) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:18.1-18.89 +def $concatn_(syntax X, var_0 : X**, nat : nat) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:19.1-19.38 + def $concatn_{syntax X, v_n : nat}(syntax X, [], v_n) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:20.1-20.73 + def $concatn_{syntax X, v_n : nat, w_lst : X*, w'_lst_lst : X**}(syntax X, [w_lst] ++ w'_lst_lst, v_n) = w_lst ++ $concatn_(syntax X, w'_lst_lst, v_n) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $concatopt_(syntax X, var_0 : X?*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X}(syntax X, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec + def $concatopt_{syntax X, w_opt : X?, w'_opt_lst : X?*}(syntax X, [w_opt] ++ w'_opt_lst) = lift(w_opt) ++ $concat_(syntax X, lift(w'_opt)*{w'_opt <- w'_opt_lst}) + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concat_(syntax X, var_0 : X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +def $inv_concatn_(syntax X, nat : nat, var_0 : X*) : X** + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:35.1-35.78 +def $disjoint_(syntax X, var_0 : X*) : bool + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:36.1-36.37 + def $disjoint_{syntax X}(syntax X, []) = true + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:37.1-37.68 + def $disjoint_{syntax X, w : X, w'_lst : X*}(syntax X, [w] ++ w'_lst) = (~ (w <- w'_lst) /\ $disjoint_(syntax X, w'_lst)) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:40.1-40.38 +def $setminus1_(syntax X, X_0 : X, var_0 : X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:44.1-44.38 + def $setminus1_{syntax X, w : X}(syntax X, w, []) = [w] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:45.1-45.78 + def $setminus1_{syntax X, w : X, w_1 : X, w'_lst : X*}(syntax X, w, [w_1] ++ w'_lst) = (if (w = w_1) then [] else $setminus1_(syntax X, w, w'_lst)) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:39.1-39.56 +def $setminus_(syntax X, var_0 : X*, var_1 : X*) : X* + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:42.1-42.40 + def $setminus_{syntax X, w_lst : X*}(syntax X, [], w_lst) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:43.1-43.90 + def $setminus_{syntax X, w_1 : X, w'_lst : X*, w_lst : X*}(syntax X, [w_1] ++ w'_lst, w_lst) = $setminus1_(syntax X, w_1, w_lst) ++ $setminus_(syntax X, w'_lst, w_lst) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:51.1-51.46 +def $setproduct2_(syntax X, X_0 : X, var_0 : X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:57.1-57.44 + def $setproduct2_{syntax X, w_1 : X}(syntax X, w_1, []) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:58.1-58.90 + def $setproduct2_{syntax X, w_1 : X, w'_lst : X*, w_lst_lst : X**}(syntax X, w_1, [w'_lst] ++ w_lst_lst) = [[w_1] ++ w'_lst] ++ $setproduct2_(syntax X, w_1, w_lst_lst) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:50.1-50.47 +def $setproduct1_(syntax X, var_0 : X*, var_1 : X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:55.1-55.46 + def $setproduct1_{syntax X, w_lst_lst : X**}(syntax X, [], w_lst_lst) = [] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:56.1-56.107 + def $setproduct1_{syntax X, w_1 : X, w'_lst : X*, w_lst_lst : X**}(syntax X, [w_1] ++ w'_lst, w_lst_lst) = $setproduct2_(syntax X, w_1, w_lst_lst) ++ $setproduct1_(syntax X, w'_lst, w_lst_lst) +} + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec +rec { + +;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:49.1-49.84 +def $setproduct_(syntax X, var_0 : X**) : X** + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:53.1-53.40 + def $setproduct_{syntax X}(syntax X, []) = [[]] + ;; ../../../../specification/wasm-3.0/0.3-aux.seq.spectec:54.1-54.90 + def $setproduct_{syntax X, w_1_lst : X*, w_lst_lst : X**}(syntax X, [w_1_lst] ++ w_lst_lst) = $setproduct1_(syntax X, w_1_lst, $setproduct_(syntax X, w_lst_lst)) +} + +;; ../../../../specification/wasm-3.0/1.0-syntax.profiles.spectec +def $ND : bool + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax bit = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_bit: `%`(bit,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule bit_case_0{i : nat}: + `%`(`%`_bit(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax byte = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_byte_0(x : byte) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_byte_0{v_num_0 : nat}(`%`_byte(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_byte: `%`(byte,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule byte_case_0{i : nat}: + `%`(`%`_byte(i,),) + -- if ((i >= 0) /\ (i <= 255)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax uN = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_uN_0(x : uN) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_uN_0{v_num_0 : nat}(`%`_uN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_uN: `%%`(N, uN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule uN_case_0{v_N : N, i : nat}: + `%%`(v_N, `%`_uN(i,)) + -- if ((i >= 0) /\ (i <= ((((2 ^ v_N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax sN = + | `%`(i : int,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_sN_0(x : sN) : (int,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_sN_0{v_num_0 : int}(`%`_sN(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_sN: `%%`(N, sN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule sN_case_0{v_N : N, i : int}: + `%%`(v_N, `%`_sN(i,)) + -- if ((((i >= - ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) /\ (i <= - (1 : nat <:> int))) \/ (i = (0 : nat <:> int))) \/ ((i >= + (1 : nat <:> int)) /\ (i <= (+ ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax iN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u8 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u16 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u31 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u32 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax u64 = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax s33 = sN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i32 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i64 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax i128 = iN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $signif(v_N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(32) = ?(23) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $signif(64) = ?(52) + def $signif{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $expon(v_N : N) : nat? + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(32) = ?(8) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $expon(64) = ?(11) + def $expon{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fun_M(v_N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fun_M{v_N : nat}(v_N) = !($signif(v_N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $E(v_N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $E{v_N : nat}(v_N) = !($expon(v_N)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax exp = int + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fNmag = + | NORM(v_m : m, v_exp : exp) + | SUBNORM(v_m : m,) + | INF + | NAN(v_m : m,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fNmag: `%%`(N, fNmag) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_0{v_N : N, v_m : m, v_exp : exp}: + `%%`(v_N, NORM_fNmag(v_m, v_exp)) + -- if ((v_m < (2 ^ $fun_M(v_N))) /\ ((((2 : nat <:> int) - ((2 ^ ((($E(v_N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) <= v_exp) /\ (v_exp <= (((2 ^ ((($E(v_N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))))) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_1{v_N : N, v_exp : exp, v_m : m}: + `%%`(v_N, SUBNORM_fNmag(v_m,)) + -- if ((v_m < (2 ^ $fun_M(v_N))) /\ (((2 : nat <:> int) - ((2 ^ ((($E(v_N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) = v_exp)) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_2{v_N : N}: + `%%`(v_N, INF_fNmag) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fNmag_case_3{v_N : N, v_m : m}: + `%%`(v_N, NAN_fNmag(v_m,)) + -- if ((1 <= v_m) /\ (v_m < (2 ^ $fun_M(v_N)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fN = + | POS(fNmag) + | NEG(fNmag) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_fN: `%%`(N, fN) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_0{v_N : N, var_0 : fNmag}: + `%%`(v_N, POS_fN(var_0)) + -- wf_fNmag: `%%`(v_N, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule fN_case_1{v_N : N, var_0 : fNmag}: + `%%`(v_N, NEG_fN(var_0)) + -- wf_fNmag: `%%`(v_N, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f32 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax f64 = fN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fzero(v_N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fzero{v_N : nat}(v_N) = POS_fN(SUBNORM_fNmag(0,)) + -- wf_fN: `%%`(v_N, POS_fN(SUBNORM_fNmag(0,))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fnat(v_N : N, nat : nat) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fnat{v_N : nat, v_n : nat}(v_N, v_n) = POS_fN(NORM_fNmag(v_n, (0 : nat <:> int))) + -- wf_fN: `%%`(v_N, POS_fN(NORM_fNmag(v_n, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $fone(v_N : N) : fN + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $fone{v_N : nat}(v_N) = POS_fN(NORM_fNmag(1, (0 : nat <:> int))) + -- wf_fN: `%%`(v_N, POS_fN(NORM_fNmag(1, (0 : nat <:> int)))) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $canon_(v_N : N) : nat + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $canon_{v_N : nat}(v_N) = (2 ^ (((!($signif(v_N)) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax vN = uN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax v128 = vN + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax list{syntax X}(syntax X) = + | `%`(X_lst : X*,) + -- if (|X_lst| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_list_0(syntax X, x : list(syntax X)) : (X*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_list_0{syntax X, v_X_list_0 : X*}(syntax X, `%`_list(v_X_list_0,)) = (v_X_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax char = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_char_0(x : char) : (nat,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_char_0{v_num_0 : nat}(`%`_char(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_char: `%`(char,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule char_case_0{i : nat}: + `%`(`%`_char(i,),) + -- if (((i >= 0) /\ (i <= 55295)) \/ ((i >= 57344) /\ (i <= 1114111))) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $cont(v_byte : byte) : nat + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $cont{b : byte}(b) = ((($proj_byte_0(b).0 : nat <:> int) - (128 : nat <:> int)) : int <:> nat) + -- if ((128 <= $proj_byte_0(b).0) /\ ($proj_byte_0(b).0 < 192)) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +def $utf8single(v_char : char) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char}(ch) = [b] + -- if ($proj_char_0(ch).0 < 128) + -- let{b : byte} b = `%`_byte($proj_char_0(ch).0,) + -- wf_byte: `%`(`%`_byte($proj_char_0(ch).0,),) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte}(ch) = [b_1 b_2] + -- if ((128 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 2048)) + -- if ($proj_char_0(ch).0 = (((2 ^ 6) * ((($proj_byte_0(b_1).0 : nat <:> int) - (192 : nat <:> int)) : int <:> nat)) + $cont(b_2))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte}(ch) = [b_1 b_2 b_3] + -- if (((2048 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 55296)) \/ ((57344 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 65536))) + -- if ($proj_char_0(ch).0 = ((((2 ^ 12) * ((($proj_byte_0(b_1).0 : nat <:> int) - (224 : nat <:> int)) : int <:> nat)) + ((2 ^ 6) * $cont(b_2))) + $cont(b_3))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8single{ch : char, b_1 : byte, b_2 : byte, b_3 : byte, b_4 : byte}(ch) = [b_1 b_2 b_3 b_4] + -- if ((65536 <= $proj_char_0(ch).0) /\ ($proj_char_0(ch).0 < 1114112)) + -- if ($proj_char_0(ch).0 = (((((2 ^ 18) * ((($proj_byte_0(b_1).0 : nat <:> int) - (240 : nat <:> int)) : int <:> nat)) + ((2 ^ 12) * $cont(b_2))) + ((2 ^ 6) * $cont(b_3))) + $cont(b_4))) + -- wf_byte: `%`(b_1,) + -- wf_byte: `%`(b_2,) + -- wf_byte: `%`(b_3,) + -- wf_byte: `%`(b_4,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $utf8(var_0 : char*) : byte* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + def $utf8{ch_lst : char*}(ch_lst) = $concat_(syntax byte, $utf8single(ch)*{ch <- ch_lst}) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax name = + | `%`(char_lst : char*,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $proj_name_0(x : name) : (char*,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $proj_name_0{v_char_list_0 : char*}(`%`_name(v_char_list_0,)) = (v_char_list_0,) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_name: `%`(name,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule name_case_0{char_lst : char*}: + `%`(`%`_name(char_lst,),) + -- (wf_char: `%`(v_char,))*{v_char <- char_lst} + -- if (|$utf8(char_lst)| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax idx = u32 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax laneidx = u8 + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax typeidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax funcidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax globalidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tableidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax memidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax tagidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax elemidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax dataidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax labelidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax localidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax fieldidx = idx + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax externidx = + | FUNC(funcidx) + | GLOBAL(globalidx) + | TABLE(tableidx) + | MEM(memidx) + | TAG(tagidx) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_externidx: `%`(externidx,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_0{var_0 : funcidx}: + `%`(FUNC_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_1{var_0 : globalidx}: + `%`(GLOBAL_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_2{var_0 : tableidx}: + `%`(TABLE_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_3{var_0 : memidx}: + `%`(MEM_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule externidx_case_4{var_0 : tagidx}: + `%`(TAG_externidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:129.1-129.86 +def $funcsxx(var_0 : externidx*) : typeidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:135.1-135.24 + def $funcsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:136.1-136.45 + def $funcsxx{x : uN, xx_lst : externidx*}([FUNC_externidx(x)] ++ xx_lst) = [x] ++ $funcsxx(xx_lst) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:137.1-137.58 + def $funcsxx{v_externidx : externidx, xx_lst : externidx*}([v_externidx] ++ xx_lst) = $funcsxx(xx_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:130.1-130.88 +def $globalsxx(var_0 : externidx*) : globalidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:139.1-139.26 + def $globalsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:140.1-140.51 + def $globalsxx{x : uN, xx_lst : externidx*}([GLOBAL_externidx(x)] ++ xx_lst) = [x] ++ $globalsxx(xx_lst) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:141.1-141.62 + def $globalsxx{v_externidx : externidx, xx_lst : externidx*}([v_externidx] ++ xx_lst) = $globalsxx(xx_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:131.1-131.87 +def $tablesxx(var_0 : externidx*) : tableidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:143.1-143.25 + def $tablesxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:144.1-144.48 + def $tablesxx{x : uN, xx_lst : externidx*}([TABLE_externidx(x)] ++ xx_lst) = [x] ++ $tablesxx(xx_lst) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:145.1-145.60 + def $tablesxx{v_externidx : externidx, xx_lst : externidx*}([v_externidx] ++ xx_lst) = $tablesxx(xx_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:132.1-132.85 +def $memsxx(var_0 : externidx*) : memidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:147.1-147.23 + def $memsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:148.1-148.42 + def $memsxx{x : uN, xx_lst : externidx*}([MEM_externidx(x)] ++ xx_lst) = [x] ++ $memsxx(xx_lst) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:149.1-149.56 + def $memsxx{v_externidx : externidx, xx_lst : externidx*}([v_externidx] ++ xx_lst) = $memsxx(xx_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:133.1-133.85 +def $tagsxx(var_0 : externidx*) : tagidx* + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:151.1-151.23 + def $tagsxx([]) = [] + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:152.1-152.42 + def $tagsxx{x : uN, xx_lst : externidx*}([TAG_externidx(x)] ++ xx_lst) = [x] ++ $tagsxx(xx_lst) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:153.1-153.56 + def $tagsxx{v_externidx : externidx, xx_lst : externidx*}([v_externidx] ++ xx_lst) = $tagsxx(xx_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +syntax free = +{ + TYPES typeidx*, + FUNCS funcidx*, + GLOBALS globalidx*, + TABLES tableidx*, + MEMS memidx*, + ELEMS elemidx*, + DATAS dataidx*, + LOCALS localidx*, + LABELS labelidx*, + TAGS tagidx* +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +relation wf_free: `%`(free,) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + rule free_case_{var_0 : typeidx*, var_1 : funcidx*, var_2 : globalidx*, var_3 : tableidx*, var_4 : memidx*, var_5 : elemidx*, var_6 : dataidx*, var_7 : localidx*, var_8 : labelidx*, var_9 : tagidx*}: + `%`({TYPES var_0, FUNCS var_1, GLOBALS var_2, TABLES var_3, MEMS var_4, ELEMS var_5, DATAS var_6, LOCALS var_7, LABELS var_8, TAGS var_9},) + -- (wf_uN: `%%`(32, var_0))*{var_0 <- var_0} + -- (wf_uN: `%%`(32, var_1))*{var_1 <- var_1} + -- (wf_uN: `%%`(32, var_2))*{var_2 <- var_2} + -- (wf_uN: `%%`(32, var_3))*{var_3 <- var_3} + -- (wf_uN: `%%`(32, var_4))*{var_4 <- var_4} + -- (wf_uN: `%%`(32, var_5))*{var_5 <- var_5} + -- (wf_uN: `%%`(32, var_6))*{var_6 <- var_6} + -- (wf_uN: `%%`(32, var_7))*{var_7 <- var_7} + -- (wf_uN: `%%`(32, var_8))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_9))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_opt(var_0 : free?) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt(?()) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_opt{v_free : free}(?(v_free)) = v_free + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:173.1-173.29 +def $free_list(var_0 : free*) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:178.1-178.25 + def $free_list([]) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec:179.1-179.57 + def $free_list{v_free : free, free'_lst : free*}([v_free] ++ free'_lst) = v_free +++ $free_list(free'_lst) +} + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_typeidx(v_typeidx : typeidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_typeidx{v_typeidx : uN}(v_typeidx) = {TYPES [v_typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [v_typeidx], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_funcidx(v_funcidx : funcidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_funcidx{v_funcidx : uN}(v_funcidx) = {TYPES [], FUNCS [v_funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [v_funcidx], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_globalidx(v_globalidx : globalidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_globalidx{v_globalidx : uN}(v_globalidx) = {TYPES [], FUNCS [], GLOBALS [v_globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [v_globalidx], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tableidx(v_tableidx : tableidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tableidx{v_tableidx : uN}(v_tableidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [v_tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [v_tableidx], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_memidx(v_memidx : memidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_memidx{v_memidx : uN}(v_memidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [v_memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [v_memidx], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_elemidx(v_elemidx : elemidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_elemidx{v_elemidx : uN}(v_elemidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [v_elemidx], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [v_elemidx], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_dataidx(v_dataidx : dataidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_dataidx{v_dataidx : uN}(v_dataidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [v_dataidx], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [v_dataidx], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_localidx(v_localidx : localidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_localidx{v_localidx : uN}(v_localidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [v_localidx], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [v_localidx], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_labelidx(v_labelidx : labelidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_labelidx{v_labelidx : uN}(v_labelidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [v_labelidx], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [v_labelidx], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_tagidx(v_tagidx : tagidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_tagidx{v_tagidx : uN}(v_tagidx) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [v_tagidx]} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS [v_tagidx]},) + +;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec +def $free_externidx(v_externidx : externidx) : free + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{v_funcidx : uN}(FUNC_externidx(v_funcidx)) = $free_funcidx(v_funcidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{v_globalidx : uN}(GLOBAL_externidx(v_globalidx)) = $free_globalidx(v_globalidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{v_tableidx : uN}(TABLE_externidx(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{v_memidx : uN}(MEM_externidx(v_memidx)) = $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.1-syntax.values.spectec + def $free_externidx{v_tagidx : uN}(TAG_externidx(v_tagidx)) = $free_tagidx(v_tagidx) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax null = + | NULL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax addrtype = + | I32 + | I64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax numtype = + | I32 + | I64 + | F32 + | F64 + +def $numtype_addrtype(var_0 : addrtype) : numtype + def $numtype_addrtype(I32_addrtype) = I32_numtype + def $numtype_addrtype(I64_addrtype) = I64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax vectype = + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax consttype = + | I32 + | I64 + | F32 + | F64 + | V128 + +def $consttype_numtype(var_0 : numtype) : consttype + def $consttype_numtype(I32_numtype) = I32_consttype + def $consttype_numtype(I64_numtype) = I64_consttype + def $consttype_numtype(F32_numtype) = F32_consttype + def $consttype_numtype(F64_numtype) = F64_consttype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax absheaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax mut = + | MUT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax final = + | FINAL + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.1-38.43 +syntax typeuse = + | _IDX(typeidx) + | _DEF(v_rectype : rectype, v_n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.1-44.26 +syntax heaptype = + | ANY + | EQ + | I31 + | STRUCT + | ARRAY + | NONE + | FUNC + | NOFUNC + | EXN + | NOEXN + | EXTERN + | NOEXTERN + | BOT + | _IDX(typeidx) + | _DEF(v_rectype : rectype, v_n : n) + | REC(n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.1-52.14 +syntax valtype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(null_opt : null?, v_heaptype : heaptype) + | BOT + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.1-92.66 +syntax storagetype = + | I32 + | I64 + | F32 + | F64 + | V128 + | REF(null_opt : null?, v_heaptype : heaptype) + | BOT + | I8 + | I16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.1-112.61 +syntax fieldtype = + | `%%`(mut_opt : mut?, v_storagetype : storagetype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.1-117.34 +syntax comptype = + | STRUCT(list(syntax fieldtype)) + | ARRAY(fieldtype) + | `FUNC%->%`(v_resulttype : list(syntax valtype), v_resulttype : list(syntax valtype)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.1-120.33 +syntax subtype = + | SUB(final_opt : final?, typeuse_lst : typeuse*, v_comptype : comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:122.1-123.22 +syntax rectype = + | REC(list(syntax subtype)) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax resulttype = list(syntax valtype) + +def $heaptype_absheaptype(var_0 : absheaptype) : heaptype + def $heaptype_absheaptype(ANY_absheaptype) = ANY_heaptype + def $heaptype_absheaptype(EQ_absheaptype) = EQ_heaptype + def $heaptype_absheaptype(I31_absheaptype) = I31_heaptype + def $heaptype_absheaptype(STRUCT_absheaptype) = STRUCT_heaptype + def $heaptype_absheaptype(ARRAY_absheaptype) = ARRAY_heaptype + def $heaptype_absheaptype(NONE_absheaptype) = NONE_heaptype + def $heaptype_absheaptype(FUNC_absheaptype) = FUNC_heaptype + def $heaptype_absheaptype(NOFUNC_absheaptype) = NOFUNC_heaptype + def $heaptype_absheaptype(EXN_absheaptype) = EXN_heaptype + def $heaptype_absheaptype(NOEXN_absheaptype) = NOEXN_heaptype + def $heaptype_absheaptype(EXTERN_absheaptype) = EXTERN_heaptype + def $heaptype_absheaptype(NOEXTERN_absheaptype) = NOEXTERN_heaptype + def $heaptype_absheaptype(BOT_absheaptype) = BOT_heaptype + +def $valtype_addrtype(var_0 : addrtype) : valtype + def $valtype_addrtype(I32_addrtype) = I32_valtype + def $valtype_addrtype(I64_addrtype) = I64_valtype + +def $storagetype_consttype(var_0 : consttype) : storagetype + def $storagetype_consttype(I32_consttype) = I32_storagetype + def $storagetype_consttype(I64_consttype) = I64_storagetype + def $storagetype_consttype(F32_consttype) = F32_storagetype + def $storagetype_consttype(F64_consttype) = F64_storagetype + def $storagetype_consttype(V128_consttype) = V128_storagetype + +def $storagetype_numtype(var_0 : numtype) : storagetype + def $storagetype_numtype(I32_numtype) = I32_storagetype + def $storagetype_numtype(I64_numtype) = I64_storagetype + def $storagetype_numtype(F32_numtype) = F32_storagetype + def $storagetype_numtype(F64_numtype) = F64_storagetype + +def $valtype_numtype(var_0 : numtype) : valtype + def $valtype_numtype(I32_numtype) = I32_valtype + def $valtype_numtype(I64_numtype) = I64_valtype + def $valtype_numtype(F32_numtype) = F32_valtype + def $valtype_numtype(F64_numtype) = F64_valtype + +def $heaptype_typeuse(var_0 : typeuse) : heaptype + def $heaptype_typeuse{x : typeidx}(_IDX_typeuse(x)) = _IDX_heaptype(x) + def $heaptype_typeuse{x0 : rectype, x1 : n}(_DEF_typeuse(x0, x1)) = _DEF_heaptype(x0, x1) + def $heaptype_typeuse{x : n}(REC_typeuse(x)) = REC_heaptype(x) + +def $storagetype_valtype(var_0 : valtype) : storagetype + def $storagetype_valtype(I32_valtype) = I32_storagetype + def $storagetype_valtype(I64_valtype) = I64_storagetype + def $storagetype_valtype(F32_valtype) = F32_storagetype + def $storagetype_valtype(F64_valtype) = F64_storagetype + def $storagetype_valtype(V128_valtype) = V128_storagetype + def $storagetype_valtype{x0 : null?, x1 : heaptype}(REF_valtype(x0, x1)) = REF_storagetype(x0, x1) + def $storagetype_valtype(BOT_valtype) = BOT_storagetype + +def $storagetype_vectype(var_0 : vectype) : storagetype + def $storagetype_vectype(V128_vectype) = V128_storagetype + +def $valtype_vectype(var_0 : vectype) : valtype + def $valtype_vectype(V128_vectype) = V128_valtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 +relation wf_typeuse: `%`(typeuse,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_0{var_0 : typeidx}: + `%`(_IDX_typeuse(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_1{v_rectype : rectype, v_n : n}: + `%`(_DEF_typeuse(v_rectype, v_n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:37.8-37.15 + rule typeuse_case_2{var_0 : n}: + `%`(REC_typeuse(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 +relation wf_heaptype: `%`(heaptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_0: + `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_1: + `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_2: + `%`(I31_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_3: + `%`(STRUCT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_4: + `%`(ARRAY_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_5: + `%`(NONE_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_6: + `%`(FUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_7: + `%`(NOFUNC_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_8: + `%`(EXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_9: + `%`(NOEXN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_10: + `%`(EXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_11: + `%`(NOEXTERN_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_12: + `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_13{var_0 : typeidx}: + `%`(_IDX_heaptype(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_14{v_rectype : rectype, v_n : n}: + `%`(_DEF_heaptype(v_rectype, v_n),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:43.8-43.16 + rule heaptype_case_15{var_0 : n}: + `%`(REC_heaptype(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 +relation wf_valtype: `%`(valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_0: + `%`(I32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_1: + `%`(I64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_2: + `%`(F32_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_3: + `%`(F64_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_4: + `%`(V128_valtype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_5{null_opt : null?, v_heaptype : heaptype}: + `%`(REF_valtype(null_opt, v_heaptype),) + -- wf_heaptype: `%`(v_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:51.8-51.15 + rule valtype_case_6: + `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 +relation wf_storagetype: `%`(storagetype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_0: + `%`(I32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_1: + `%`(I64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_2: + `%`(F32_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_3: + `%`(F64_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_4: + `%`(V128_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_5{null_opt : null?, v_heaptype : heaptype}: + `%`(REF_storagetype(null_opt, v_heaptype),) + -- wf_heaptype: `%`(v_heaptype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_6: + `%`(BOT_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_7: + `%`(I8_storagetype,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:92.8-92.19 + rule storagetype_case_8: + `%`(I16_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 +relation wf_fieldtype: `%`(fieldtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:112.8-112.17 + rule fieldtype_case_0{mut_opt : mut?, v_storagetype : storagetype}: + `%`(`%%`_fieldtype(mut_opt, v_storagetype),) + -- wf_storagetype: `%`(v_storagetype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 +relation wf_comptype: `%`(comptype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_0{var_0 : list(syntax fieldtype)}: + `%`(STRUCT_comptype(var_0),) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_1{var_0 : fieldtype}: + `%`(ARRAY_comptype(var_0),) + -- wf_fieldtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:114.8-114.16 + rule comptype_case_2{v_resulttype : resulttype, resulttype_0 : resulttype}: + `%`(`FUNC%->%`_comptype(v_resulttype, resulttype_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 +relation wf_subtype: `%`(subtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:119.8-119.15 + rule subtype_case_0{final_opt : final?, typeuse_lst : typeuse*, v_comptype : comptype}: + `%`(SUB_subtype(final_opt, typeuse_lst, v_comptype),) + -- (wf_typeuse: `%`(v_typeuse,))*{v_typeuse <- typeuse_lst} + -- wf_comptype: `%`(v_comptype,) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax deftype = + | _DEF(v_rectype : rectype, v_n : n) + +def $heaptype_deftype(var_0 : deftype) : heaptype + def $heaptype_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_heaptype(x0, x1) + +def $typeuse_deftype(var_0 : deftype) : typeuse + def $typeuse_deftype{x0 : rectype, x1 : n}(_DEF_deftype(x0, x1)) = _DEF_typeuse(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax typevar = + | _IDX(typeidx) + | REC(n) + +def $typeuse_typevar(var_0 : typevar) : typeuse + def $typeuse_typevar{x : typeidx}(_IDX_typevar(x)) = _IDX_typeuse(x) + def $typeuse_typevar{x : n}(REC_typevar(x)) = REC_typeuse(x) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_typevar: `%`(typevar,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_0{var_0 : typeidx}: + `%`(_IDX_typevar(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule typevar_case_1{var_0 : n}: + `%`(REC_typevar(var_0),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax reftype = + | REF(null_opt : null?, v_heaptype : heaptype) + +def $storagetype_reftype(var_0 : reftype) : storagetype + def $storagetype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_storagetype(x0, x1) + +def $valtype_reftype(var_0 : reftype) : valtype + def $valtype_reftype{x0 : null?, x1 : heaptype}(REF_reftype(x0, x1)) = REF_valtype(x0, x1) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_reftype: `%`(reftype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule reftype_case_0{null_opt : null?, v_heaptype : heaptype}: + `%`(REF_reftype(null_opt, v_heaptype),) + -- wf_heaptype: `%`(v_heaptype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Inn = addrtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Fnn = + | F32 + | F64 + +def $numtype_Fnn(var_0 : Fnn) : numtype + def $numtype_Fnn(F32_Fnn) = F32_numtype + def $numtype_Fnn(F64_Fnn) = F64_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Vnn = vectype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Cnn = + | I32 + | I64 + | F32 + | F64 + | V128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ANYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ANYREF = REF_reftype(?(NULL_null), ANY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ANY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EQREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EQREF = REF_reftype(?(NULL_null), EQ_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EQ_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $I31REF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $I31REF = REF_reftype(?(NULL_null), I31_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), I31_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $STRUCTREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $STRUCTREF = REF_reftype(?(NULL_null), STRUCT_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), STRUCT_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $ARRAYREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $ARRAYREF = REF_reftype(?(NULL_null), ARRAY_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ARRAY_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FUNCREF = REF_reftype(?(NULL_null), FUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXNREF = REF_reftype(?(NULL_null), EXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $EXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $EXTERNREF = REF_reftype(?(NULL_null), EXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), EXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLREF = REF_reftype(?(NULL_null), NONE_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NONE_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLFUNCREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLFUNCREF = REF_reftype(?(NULL_null), NOFUNC_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOFUNC_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXNREF = REF_reftype(?(NULL_null), NOEXN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $NULLEXTERNREF : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $NULLEXTERNREF = REF_reftype(?(NULL_null), NOEXTERN_heaptype) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), NOEXTERN_heaptype),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax packtype = + | I8 + | I16 + +def $storagetype_packtype(var_0 : packtype) : storagetype + def $storagetype_packtype(I8_packtype) = I8_storagetype + def $storagetype_packtype(I16_packtype) = I16_storagetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax lanetype = + | I32 + | I64 + | F32 + | F64 + | I8 + | I16 + +def $lanetype_Fnn(var_0 : Fnn) : lanetype + def $lanetype_Fnn(F32_Fnn) = F32_lanetype + def $lanetype_Fnn(F64_Fnn) = F64_lanetype + +def $lanetype_addrtype(var_0 : addrtype) : lanetype + def $lanetype_addrtype(I32_addrtype) = I32_lanetype + def $lanetype_addrtype(I64_addrtype) = I64_lanetype + +def $lanetype_numtype(var_0 : numtype) : lanetype + def $lanetype_numtype(I32_numtype) = I32_lanetype + def $lanetype_numtype(I64_numtype) = I64_lanetype + def $lanetype_numtype(F32_numtype) = F32_lanetype + def $lanetype_numtype(F64_numtype) = F64_lanetype + +def $lanetype_packtype(var_0 : packtype) : lanetype + def $lanetype_packtype(I8_packtype) = I8_lanetype + def $lanetype_packtype(I16_packtype) = I16_lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Pnn = packtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Jnn = + | I32 + | I64 + | I8 + | I16 + +def $lanetype_Jnn(var_0 : Jnn) : lanetype + def $lanetype_Jnn(I32_Jnn) = I32_lanetype + def $lanetype_Jnn(I64_Jnn) = I64_lanetype + def $lanetype_Jnn(I8_Jnn) = I8_lanetype + def $lanetype_Jnn(I16_Jnn) = I16_lanetype + +def $Jnn_addrtype(var_0 : addrtype) : Jnn + def $Jnn_addrtype(I32_addrtype) = I32_Jnn + def $Jnn_addrtype(I64_addrtype) = I64_Jnn + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax Lnn = lanetype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax limits = + | `[%..%]`(v_u64 : u64, u64_opt : u64?) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_limits: `%`(limits,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule limits_case_0{v_u64 : u64, u64_opt : u64?}: + `%`(`[%..%]`_limits(v_u64, u64_opt),) + -- wf_uN: `%%`(64, v_u64) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tagtype = typeuse + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax globaltype = + | `%%`(mut_opt : mut?, v_valtype : valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_globaltype: `%`(globaltype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule globaltype_case_0{mut_opt : mut?, v_valtype : valtype}: + `%`(`%%`_globaltype(mut_opt, v_valtype),) + -- wf_valtype: `%`(v_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax memtype = + | `%%PAGE`(v_addrtype : addrtype, v_limits : limits) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_memtype: `%`(memtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule memtype_case_0{v_addrtype : addrtype, v_limits : limits}: + `%`(`%%PAGE`_memtype(v_addrtype, v_limits),) + -- wf_limits: `%`(v_limits,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax tabletype = + | `%%%`(v_addrtype : addrtype, v_limits : limits, v_reftype : reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_tabletype: `%`(tabletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule tabletype_case_0{v_addrtype : addrtype, v_limits : limits, v_reftype : reftype}: + `%`(`%%%`_tabletype(v_addrtype, v_limits, v_reftype),) + -- wf_limits: `%`(v_limits,) + -- wf_reftype: `%`(v_reftype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax datatype = + | OK + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax elemtype = reftype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax externtype = + | TAG(tagtype) + | GLOBAL(globaltype) + | MEM(memtype) + | TABLE(tabletype) + | FUNC(typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_externtype: `%`(externtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_0{var_0 : tagtype}: + `%`(TAG_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_1{var_0 : globaltype}: + `%`(GLOBAL_externtype(var_0),) + -- wf_globaltype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_2{var_0 : memtype}: + `%`(MEM_externtype(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_3{var_0 : tabletype}: + `%`(TABLE_externtype(var_0),) + -- wf_tabletype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule externtype_case_4{var_0 : typeuse}: + `%`(FUNC_externtype(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +syntax moduletype = + | `%->%`(externtype_lst : externtype*, externtype_lst : externtype*) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +relation wf_moduletype: `%`(moduletype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + rule moduletype_case_0{externtype_lst : externtype*, externtype_lst_0 : externtype*}: + `%`(`%->%`_moduletype(externtype_lst, externtype_lst_0),) + -- (wf_externtype: `%`(v_externtype,))*{v_externtype <- externtype_lst} + -- (wf_externtype: `%`(externtype_lst_0,))*{externtype_lst_0 <- externtype_lst_0} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $IN(v_N : N) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $IN(64) = ?(I64_Inn) + def $IN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $FN(v_N : N) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $FN(64) = ?(F64_Fnn) + def $FN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $JN(v_N : N) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(32) = ?(I32_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $JN(64) = ?(I64_Jnn) + def $JN{x0 : N}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $size(v_numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(I64_numtype) = 64 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F32_numtype) = 32 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $size(F64_numtype) = 64 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsize(v_vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsize(V128_vectype) = 128 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psize(v_packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I8_packtype) = 8 + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psize(I16_packtype) = 16 + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsize(v_lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I32_lanetype) = $size(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I64_lanetype) = $size(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F32_lanetype) = $size(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(F64_lanetype) = $size(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I8_lanetype) = $psize(I8_packtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsize(I16_lanetype) = $psize(I16_packtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $zsize(v_storagetype : storagetype) : nat? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I32_storagetype) = ?($size(I32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I64_storagetype) = ?($size(I64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F32_storagetype) = ?($size(F32_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(F64_storagetype) = ?($size(F64_numtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(V128_storagetype) = ?($vsize(V128_vectype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I8_storagetype) = ?($psize(I8_packtype)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $zsize(I16_storagetype) = ?($psize(I16_packtype)) + def $zsize{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $isize(v_Inn : Inn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $isize{v_Inn : addrtype}(v_Inn) = $size($numtype_addrtype(v_Inn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsize(v_Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsize{v_Jnn : Jnn}(v_Jnn) = $lsize($lanetype_Jnn(v_Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $fsize(v_Fnn : Fnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $fsize{v_Fnn : Fnn}(v_Fnn) = $size($numtype_Fnn(v_Fnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_isize(nat : nat) : Inn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(32) = ?(I32_Inn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_isize(64) = ?(I64_Inn) + def $inv_isize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsize(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(8) = ?(I8_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize(16) = ?(I16_Jnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsize{v_n : nat}(v_n) = $Jnn_addrtype(iter_val#1)?{iter_val#1 <- $inv_isize(v_n)} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_fsize(nat : nat) : Fnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(32) = ?(F32_Fnn) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_fsize(64) = ?(F64_Fnn) + def $inv_fsize{x0 : nat}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn(v_numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn1(v_numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn1{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $sizenn2(v_numtype : numtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $sizenn2{nt : numtype}(nt) = $size(nt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vsizenn(v_vectype : vectype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vsizenn{vt : vectype}(vt) = $vsize(vt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $psizenn(v_packtype : packtype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $psizenn{pt : packtype}(pt) = $psize(pt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn(v_lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn1(v_lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn1{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lsizenn2(v_lanetype : lanetype) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lsizenn2{lt : lanetype}(lt) = $lsize(lt) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $jsizenn(v_Jnn : Jnn) : nat + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $jsizenn{v_Jnn : Jnn}(v_Jnn) = $lsize($lanetype_Jnn(v_Jnn)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $inv_jsizenn(nat : nat) : Jnn? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $inv_jsizenn{v_n : nat}(v_n) = $inv_jsize(v_n) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $lunpack(v_lanetype : lanetype) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I32_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I64_lanetype) = I64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F32_lanetype) = F32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(F64_lanetype) = F64_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I8_lanetype) = I32_numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $lunpack(I16_lanetype) = I32_numtype + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $unpack(v_storagetype : storagetype) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(BOT_storagetype) = BOT_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack{null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype)) = REF_valtype(null_opt, v_heaptype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(V128_storagetype) = V128_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F64_storagetype) = F64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(F32_storagetype) = F32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I64_storagetype) = I64_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I32_storagetype) = I32_valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I8_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $unpack(I16_storagetype) = I32_valtype + -- wf_valtype: `%`(I32_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $nunpack(v_storagetype : storagetype) : numtype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I32_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I64_storagetype) = ?(I64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F32_storagetype) = ?(F32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(F64_storagetype) = ?(F64_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I8_storagetype) = ?(I32_numtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $nunpack(I16_storagetype) = ?(I32_numtype) + def $nunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $vunpack(v_storagetype : storagetype) : vectype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $vunpack(V128_storagetype) = ?(V128_vectype) + def $vunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $cunpack(v_storagetype : storagetype) : consttype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?(I64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?(F32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?(F64_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(V128_storagetype) = ?(V128_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?(I32_consttype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I32_storagetype) = ?($consttype_numtype($lunpack(I32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I64_storagetype) = ?($consttype_numtype($lunpack(I64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F32_storagetype) = ?($consttype_numtype($lunpack(F32_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(F64_storagetype) = ?($consttype_numtype($lunpack(F64_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I8_storagetype) = ?($consttype_numtype($lunpack(I8_lanetype))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $cunpack(I16_storagetype) = ?($consttype_numtype($lunpack(I16_lanetype))) + def $cunpack{x0 : storagetype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $minat(v_addrtype : addrtype, v_addrtype_0 : addrtype) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $minat{at_1 : addrtype, at_2 : addrtype}(at_1, at_2) = (if ($size($numtype_addrtype(at_1)) <= $size($numtype_addrtype(at_2))) then at_1 else at_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $diffrt(v_reftype : reftype, v_reftype_0 : reftype) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{null_1_opt : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1_opt, ht_1), REF_reftype(?(NULL_null), ht_2)) = REF_reftype(?(), ht_1) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $diffrt{null_1_opt : null?, ht_1 : heaptype, ht_2 : heaptype}(REF_reftype(null_1_opt, ht_1), REF_reftype(?(), ht_2)) = REF_reftype(null_1_opt, ht_1) + -- wf_reftype: `%`(REF_reftype(null_1_opt, ht_1),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $as_deftype(v_typeuse : typeuse) : deftype? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $as_deftype{v_rectype : rectype, v_n : n}(_DEF_typeuse(v_rectype, v_n)) = ?(_DEF_deftype(v_rectype, v_n)) + def $as_deftype{x0 : typeuse}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:308.1-308.87 +def $tagsxt(var_0 : externtype*) : tagtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:314.1-314.23 + def $tagsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:315.1-315.44 + def $tagsxt{jt : typeuse, xt_lst : externtype*}([TAG_externtype(jt)] ++ xt_lst) = [jt] ++ $tagsxt(xt_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:316.1-316.57 + def $tagsxt{v_externtype : externtype, xt_lst : externtype*}([v_externtype] ++ xt_lst) = $tagsxt(xt_lst) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:309.1-309.90 +def $globalsxt(var_0 : externtype*) : globaltype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:318.1-318.26 + def $globalsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:319.1-319.53 + def $globalsxt{gt : globaltype, xt_lst : externtype*}([GLOBAL_externtype(gt)] ++ xt_lst) = [gt] ++ $globalsxt(xt_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:320.1-320.63 + def $globalsxt{v_externtype : externtype, xt_lst : externtype*}([v_externtype] ++ xt_lst) = $globalsxt(xt_lst) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:310.1-310.87 +def $memsxt(var_0 : externtype*) : memtype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:322.1-322.23 + def $memsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:323.1-323.44 + def $memsxt{mt : memtype, xt_lst : externtype*}([MEM_externtype(mt)] ++ xt_lst) = [mt] ++ $memsxt(xt_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:324.1-324.57 + def $memsxt{v_externtype : externtype, xt_lst : externtype*}([v_externtype] ++ xt_lst) = $memsxt(xt_lst) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:311.1-311.89 +def $tablesxt(var_0 : externtype*) : tabletype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:326.1-326.25 + def $tablesxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:327.1-327.50 + def $tablesxt{tt : tabletype, xt_lst : externtype*}([TABLE_externtype(tt)] ++ xt_lst) = [tt] ++ $tablesxt(xt_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:328.1-328.61 + def $tablesxt{v_externtype : externtype, xt_lst : externtype*}([v_externtype] ++ xt_lst) = $tablesxt(xt_lst) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:312.1-312.88 +def $funcsxt(var_0 : externtype*) : deftype* + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:330.1-330.24 + def $funcsxt([]) = [] + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:331.1-331.47 + def $funcsxt{v_rectype : rectype, v_n : n, xt_lst : externtype*}([FUNC_externtype(_DEF_typeuse(v_rectype, v_n))] ++ xt_lst) = [_DEF_deftype(v_rectype, v_n)] ++ $funcsxt(xt_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:332.1-332.59 + def $funcsxt{v_externtype : externtype, xt_lst : externtype*}([v_externtype] ++ xt_lst) = $funcsxt(xt_lst) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:337.1-337.126 +def $subst_typevar(v_typevar : typevar, var_0 : typevar*, var_1 : typeuse*) : typeuse? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:365.1-365.38 + def $subst_typevar{tv : typevar}(tv, [], []) = ?($typeuse_typevar(tv)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:366.1-366.95 + def $subst_typevar{tv : typevar, tv_1 : typevar, tv'_lst : typevar*, tu_1 : typeuse, tu'_lst : typeuse*}(tv, [tv_1] ++ tv'_lst, [tu_1] ++ tu'_lst) = (if (tv = tv_1) then tu_1 else iter_val#2)?{iter_val#2 <- $subst_typevar(tv, tv'_lst, tu'_lst)} + def $subst_typevar{x0 : typevar, x1 : typevar*, x2 : typeuse*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:401.1-401.73 +def $minus_recs(var_0 : typevar*, var_1 : typeuse*) : (typevar*, typeuse*)? + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:402.1-402.39 + def $minus_recs([], []) = ?(([], [])) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:403.1-403.63 + def $minus_recs{v_n : nat, tv_lst : typevar*, tu_1 : typeuse, tu_lst : typeuse*}([REC_typevar(v_n)] ++ tv_lst, [tu_1] ++ tu_lst) = $minus_recs(tv_lst, tu_lst) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:404.1-405.45 + def $minus_recs{x : uN, tv_lst : typevar*, tu_1 : typeuse, tu_lst : typeuse*}([_IDX_typevar(x)] ++ tv_lst, [tu_1] ++ tu_lst) = ?(([_IDX_typevar(x)] ++ tv'_lst, [tu_1] ++ tu'_lst)) + -- let{tv'_lst : typevar*, tu'_lst : typeuse*} (tv'_lst, tu'_lst) = !($minus_recs(tv_lst, tu_lst)) + -- wf_typevar: `%`(_IDX_typevar(x),) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_packtype(v_packtype : packtype, var_0 : typevar*, var_1 : typeuse*) : packtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_packtype{pt : packtype, tv_lst : typevar*, tu_lst : typeuse*}(pt, tv_lst, tu_lst) = pt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_numtype(v_numtype : numtype, var_0 : typevar*, var_1 : typeuse*) : numtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_numtype{nt : numtype, tv_lst : typevar*, tu_lst : typeuse*}(nt, tv_lst, tu_lst) = nt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_vectype(v_vectype : vectype, var_0 : typevar*, var_1 : typeuse*) : vectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_vectype{vt : vectype, tv_lst : typevar*, tu_lst : typeuse*}(vt, tv_lst, tu_lst) = vt + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:338.1-338.112 +def $subst_typeuse(v_typeuse : typeuse, var_0 : typevar*, var_1 : typeuse*) : typeuse + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_1 : n, tv_lst : typevar*, tu_lst : typeuse*}(REC_typeuse(var_1), tv_lst, tu_lst) = !($subst_typevar(REC_typevar(var_1), tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:369.1-369.66 + def $subst_typeuse{var_0 : typeidx, tv_lst : typevar*, tu_lst : typeuse*}(_IDX_typeuse(var_0), tv_lst, tu_lst) = !($subst_typevar(_IDX_typevar(var_0), tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:370.1-370.64 + def $subst_typeuse{v_rectype : rectype, v_n : n, tv_lst : typevar*, tu_lst : typeuse*}(_DEF_typeuse(v_rectype, v_n), tv_lst, tu_lst) = $typeuse_deftype($subst_deftype(_DEF_deftype(v_rectype, v_n), tv_lst, tu_lst)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:343.1-343.112 +def $subst_heaptype(v_heaptype : heaptype, var_0 : typevar*, var_1 : typeuse*) : heaptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_1 : n, tv_lst : typevar*, tu_lst : typeuse*}(REC_heaptype(var_1), tv_lst, tu_lst) = $heaptype_typeuse(!($subst_typevar(REC_typevar(var_1), tv_lst, tu_lst))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:376.1-376.67 + def $subst_heaptype{var_0 : typeidx, tv_lst : typevar*, tu_lst : typeuse*}(_IDX_heaptype(var_0), tv_lst, tu_lst) = $heaptype_typeuse(!($subst_typevar(_IDX_typevar(var_0), tv_lst, tu_lst))) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:377.1-377.65 + def $subst_heaptype{v_rectype : rectype, v_n : n, tv_lst : typevar*, tu_lst : typeuse*}(_DEF_heaptype(v_rectype, v_n), tv_lst, tu_lst) = $heaptype_deftype($subst_deftype(_DEF_deftype(v_rectype, v_n), tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:378.1-378.53 + def $subst_heaptype{ht : heaptype, tv_lst : typevar*, tu_lst : typeuse*}(ht, tv_lst, tu_lst) = ht + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:344.1-344.112 +def $subst_reftype(v_reftype : reftype, var_0 : typevar*, var_1 : typeuse*) : reftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:380.1-380.87 + def $subst_reftype{null_opt : null?, ht : heaptype, tv_lst : typevar*, tu_lst : typeuse*}(REF_reftype(null_opt, ht), tv_lst, tu_lst) = REF_reftype(null_opt, $subst_heaptype(ht, tv_lst, tu_lst)) + -- wf_reftype: `%`(REF_reftype(null_opt, $subst_heaptype(ht, tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:345.1-345.112 +def $subst_valtype(v_valtype : valtype, var_0 : typevar*, var_1 : typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(I32_valtype, tv_lst, tu_lst) = $valtype_numtype($subst_numtype(I32_numtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(I64_valtype, tv_lst, tu_lst) = $valtype_numtype($subst_numtype(I64_numtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(F32_valtype, tv_lst, tu_lst) = $valtype_numtype($subst_numtype(F32_numtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:382.1-382.64 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(F64_valtype, tv_lst, tu_lst) = $valtype_numtype($subst_numtype(F64_numtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:383.1-383.64 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(V128_valtype, tv_lst, tu_lst) = $valtype_vectype($subst_vectype(V128_vectype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:384.1-384.64 + def $subst_valtype{null_opt : null?, v_heaptype : heaptype, tv_lst : typevar*, tu_lst : typeuse*}(REF_valtype(null_opt, v_heaptype), tv_lst, tu_lst) = $valtype_reftype($subst_reftype(REF_reftype(null_opt, v_heaptype), tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:385.1-385.40 + def $subst_valtype{tv_lst : typevar*, tu_lst : typeuse*}(BOT_valtype, tv_lst, tu_lst) = BOT_valtype + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:348.1-348.112 +def $subst_storagetype(v_storagetype : storagetype, var_0 : typevar*, var_1 : typeuse*) : storagetype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(BOT_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(BOT_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{null_opt : null?, v_heaptype : heaptype, tv_lst : typevar*, tu_lst : typeuse*}(REF_storagetype(null_opt, v_heaptype), tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(REF_valtype(null_opt, v_heaptype), tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(V128_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(V128_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(F64_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(F64_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(F32_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(F32_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(I64_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(I64_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:389.1-389.66 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(I32_storagetype, tv_lst, tu_lst) = $storagetype_valtype($subst_valtype(I32_valtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(I8_storagetype, tv_lst, tu_lst) = $storagetype_packtype($subst_packtype(I8_packtype, tv_lst, tu_lst)) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:390.1-390.69 + def $subst_storagetype{tv_lst : typevar*, tu_lst : typeuse*}(I16_storagetype, tv_lst, tu_lst) = $storagetype_packtype($subst_packtype(I16_packtype, tv_lst, tu_lst)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:349.1-349.112 +def $subst_fieldtype(v_fieldtype : fieldtype, var_0 : typevar*, var_1 : typeuse*) : fieldtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:392.1-392.82 + def $subst_fieldtype{mut_opt : mut?, zt : storagetype, tv_lst : typevar*, tu_lst : typeuse*}(`%%`_fieldtype(mut_opt, zt), tv_lst, tu_lst) = `%%`_fieldtype(mut_opt, $subst_storagetype(zt, tv_lst, tu_lst)) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut_opt, $subst_storagetype(zt, tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:351.1-351.112 +def $subst_comptype(v_comptype : comptype, var_0 : typevar*, var_1 : typeuse*) : comptype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:394.1-394.85 + def $subst_comptype{ft_lst : fieldtype*, tv_lst : typevar*, tu_lst : typeuse*}(STRUCT_comptype(`%`_list(ft_lst,)), tv_lst, tu_lst) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv_lst, tu_lst)*{ft <- ft_lst},)) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list($subst_fieldtype(ft#2, tv_lst, tu_lst)*{ft#2 <- ft_lst},)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:395.1-395.81 + def $subst_comptype{ft : fieldtype, tv_lst : typevar*, tu_lst : typeuse*}(ARRAY_comptype(ft), tv_lst, tu_lst) = ARRAY_comptype($subst_fieldtype(ft, tv_lst, tu_lst)) + -- wf_comptype: `%`(ARRAY_comptype($subst_fieldtype(ft, tv_lst, tu_lst)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:396.1-396.123 + def $subst_comptype{t_1_lst : valtype*, t_2_lst : valtype*, tv_lst : typevar*, tu_lst : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)), tv_lst, tu_lst) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv_lst, tu_lst)*{t_1 <- t_1_lst},), `%`_resulttype($subst_valtype(t_2, tv_lst, tu_lst)*{t_2 <- t_2_lst},)) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1#3, tv_lst, tu_lst)*{t_1#3 <- t_1_lst},), `%`_resulttype($subst_valtype(t_2#7, tv_lst, tu_lst)*{t_2#7 <- t_2_lst},)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:352.1-352.112 +def $subst_subtype(v_subtype : subtype, var_0 : typevar*, var_1 : typeuse*) : subtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:398.1-399.74 + def $subst_subtype{final_opt : final?, tu'_lst : typeuse*, ct : comptype, tv_lst : typevar*, tu_lst : typeuse*}(SUB_subtype(final_opt, tu'_lst, ct), tv_lst, tu_lst) = SUB_subtype(final_opt, $subst_typeuse(tu', tv_lst, tu_lst)*{tu' <- tu'_lst}, $subst_comptype(ct, tv_lst, tu_lst)) + -- wf_subtype: `%`(SUB_subtype(final_opt, $subst_typeuse(tu'#4, tv_lst, tu_lst)*{tu'#4 <- tu'_lst}, $subst_comptype(ct, tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:353.1-353.112 +def $subst_rectype(v_rectype : rectype, var_0 : typevar*, var_1 : typeuse*) : rectype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:407.1-408.45 + def $subst_rectype{st_lst : subtype*, tv_lst : typevar*, tu_lst : typeuse*}(REC_rectype(`%`_list(st_lst,)), tv_lst, tu_lst) = REC_rectype(`%`_list($subst_subtype(st, tv'_lst, tu'_lst)*{st <- st_lst},)) + -- let{tv'_lst : typevar*, tu'_lst : typeuse*} (tv'_lst, tu'_lst) = !($minus_recs(tv_lst, tu_lst)) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:354.1-354.112 +def $subst_deftype(v_deftype : deftype, var_0 : typevar*, var_1 : typeuse*) : deftype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:413.1-413.80 + def $subst_deftype{qt : rectype, i : nat, tv_lst : typevar*, tu_lst : typeuse*}(_DEF_deftype(qt, i), tv_lst, tu_lst) = _DEF_deftype($subst_rectype(qt, tv_lst, tu_lst), i) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_addrtype(v_addrtype : addrtype, var_0 : typevar*, var_1 : typeuse*) : addrtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_addrtype{at : addrtype, tv_lst : typevar*, tu_lst : typeuse*}(at, tv_lst, tu_lst) = at + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tagtype(v_tagtype : tagtype, var_0 : typevar*, var_1 : typeuse*) : tagtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tagtype{tu' : typeuse, tv_lst : typevar*, tu_lst : typeuse*}(tu', tv_lst, tu_lst) = $subst_typeuse(tu', tv_lst, tu_lst) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_globaltype(v_globaltype : globaltype, var_0 : typevar*, var_1 : typeuse*) : globaltype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_globaltype{mut_opt : mut?, t : valtype, tv_lst : typevar*, tu_lst : typeuse*}(`%%`_globaltype(mut_opt, t), tv_lst, tu_lst) = `%%`_globaltype(mut_opt, $subst_valtype(t, tv_lst, tu_lst)) + -- wf_globaltype: `%`(`%%`_globaltype(mut_opt, $subst_valtype(t, tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_memtype(v_memtype : memtype, var_0 : typevar*, var_1 : typeuse*) : memtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_memtype{at : addrtype, lim : limits, tv_lst : typevar*, tu_lst : typeuse*}(`%%PAGE`_memtype(at, lim), tv_lst, tu_lst) = `%%PAGE`_memtype(at, lim) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_tabletype(v_tabletype : tabletype, var_0 : typevar*, var_1 : typeuse*) : tabletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_tabletype{at : addrtype, lim : limits, rt : reftype, tv_lst : typevar*, tu_lst : typeuse*}(`%%%`_tabletype(at, lim, rt), tv_lst, tu_lst) = `%%%`_tabletype(at, lim, $subst_reftype(rt, tv_lst, tu_lst)) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, $subst_reftype(rt, tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_externtype(v_externtype : externtype, var_0 : typevar*, var_1 : typeuse*) : externtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{jt : typeuse, tv_lst : typevar*, tu_lst : typeuse*}(TAG_externtype(jt), tv_lst, tu_lst) = TAG_externtype($subst_tagtype(jt, tv_lst, tu_lst)) + -- wf_externtype: `%`(TAG_externtype($subst_tagtype(jt, tv_lst, tu_lst)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{gt : globaltype, tv_lst : typevar*, tu_lst : typeuse*}(GLOBAL_externtype(gt), tv_lst, tu_lst) = GLOBAL_externtype($subst_globaltype(gt, tv_lst, tu_lst)) + -- wf_externtype: `%`(GLOBAL_externtype($subst_globaltype(gt, tv_lst, tu_lst)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tt : tabletype, tv_lst : typevar*, tu_lst : typeuse*}(TABLE_externtype(tt), tv_lst, tu_lst) = TABLE_externtype($subst_tabletype(tt, tv_lst, tu_lst)) + -- wf_externtype: `%`(TABLE_externtype($subst_tabletype(tt, tv_lst, tu_lst)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{mt : memtype, tv_lst : typevar*, tu_lst : typeuse*}(MEM_externtype(mt), tv_lst, tu_lst) = MEM_externtype($subst_memtype(mt, tv_lst, tu_lst)) + -- wf_externtype: `%`(MEM_externtype($subst_memtype(mt, tv_lst, tu_lst)),) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_externtype{tu' : typeuse, tv_lst : typevar*, tu_lst : typeuse*}(FUNC_externtype(tu'), tv_lst, tu_lst) = FUNC_externtype($subst_typeuse(tu', tv_lst, tu_lst)) + -- wf_externtype: `%`(FUNC_externtype($subst_typeuse(tu', tv_lst, tu_lst)),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_moduletype(v_moduletype : moduletype, var_0 : typevar*, var_1 : typeuse*) : moduletype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_moduletype{xt_1_lst : externtype*, xt_2_lst : externtype*, tv_lst : typevar*, tu_lst : typeuse*}(`%->%`_moduletype(xt_1_lst, xt_2_lst), tv_lst, tu_lst) = `%->%`_moduletype($subst_externtype(xt_1, tv_lst, tu_lst)*{xt_1 <- xt_1_lst}, $subst_externtype(xt_2, tv_lst, tu_lst)*{xt_2 <- xt_2_lst}) + -- wf_moduletype: `%`(`%->%`_moduletype($subst_externtype(xt_1#2, tv_lst, tu_lst)*{xt_1#2 <- xt_1_lst}, $subst_externtype(xt_2#2, tv_lst, tu_lst)*{xt_2#2 <- xt_2_lst}),) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $subst_all_valtype(v_valtype : valtype, var_0 : typeuse*) : valtype + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $subst_all_valtype{t : valtype, v_n : nat, tu_lst : typeuse*, i : nat}(t, tu_lst) = $subst_valtype(t, _IDX_typevar(`%`_typeidx(i,))^(i%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:491.1-491.34 +def $free_subtype(v_subtype : subtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:550.1-551.66 + def $free_subtype{final_opt : final?, typeuse_lst : typeuse*, v_comptype : comptype}(SUB_subtype(final_opt, typeuse_lst, v_comptype)) = $free_list($free_typeuse(v_typeuse)*{v_typeuse <- typeuse_lst}) +++ $free_comptype(v_comptype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:492.1-492.34 +def $free_rectype(v_rectype : rectype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:553.1-553.70 + def $free_rectype{subtype_lst : subtype*}(REC_rectype(`%`_list(subtype_lst,))) = $free_list($free_subtype(v_subtype)*{v_subtype <- subtype_lst}) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:520.1-520.34 +def $free_deftype(v_deftype : deftype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec:521.1-521.59 + def $free_deftype{v_rectype : rectype, v_n : nat}(_DEF_deftype(v_rectype, v_n)) = $free_rectype(v_rectype) +} + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tagtype(v_tagtype : tagtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tagtype{v_typeuse : typeuse}(v_typeuse) = $free_typeuse(v_typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_globaltype(v_globaltype : globaltype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_globaltype{mut_opt : mut?, v_valtype : valtype}(`%%`_globaltype(mut_opt, v_valtype)) = $free_valtype(v_valtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_memtype(v_memtype : memtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_memtype{v_addrtype : addrtype, v_limits : limits}(`%%PAGE`_memtype(v_addrtype, v_limits)) = $free_addrtype(v_addrtype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_tabletype(v_tabletype : tabletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_tabletype{v_addrtype : addrtype, v_limits : limits, v_reftype : reftype}(`%%%`_tabletype(v_addrtype, v_limits, v_reftype)) = $free_addrtype(v_addrtype) +++ $free_reftype(v_reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_datatype(v_datatype : datatype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_datatype(OK_datatype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_elemtype(v_elemtype : elemtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_elemtype{v_reftype : reftype}(v_reftype) = $free_reftype(v_reftype) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_externtype(v_externtype : externtype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{v_tagtype : typeuse}(TAG_externtype(v_tagtype)) = $free_tagtype(v_tagtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{v_globaltype : globaltype}(GLOBAL_externtype(v_globaltype)) = $free_globaltype(v_globaltype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{v_memtype : memtype}(MEM_externtype(v_memtype)) = $free_memtype(v_memtype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{v_tabletype : tabletype}(TABLE_externtype(v_tabletype)) = $free_tabletype(v_tabletype) + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_externtype{v_typeuse : typeuse}(FUNC_externtype(v_typeuse)) = $free_typeuse(v_typeuse) + +;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec +def $free_moduletype(v_moduletype : moduletype) : free + ;; ../../../../specification/wasm-3.0/1.2-syntax.types.spectec + def $free_moduletype{externtype_1_lst : externtype*, externtype_2_lst : externtype*}(`%->%`_moduletype(externtype_1_lst, externtype_2_lst)) = $free_list($free_externtype(externtype_1)*{externtype_1 <- externtype_1_lst}) +++ $free_list($free_externtype(externtype_2)*{externtype_2 <- externtype_2_lst}) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax num_ = + | mk_num__0(v_Inn : Inn, var_x : iN) + | mk_num__1(v_Fnn : Fnn, var_x : fN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_num_: `%%`(numtype, num_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_0{v_numtype : numtype, v_Inn : Inn, var_x : iN}: + `%%`(v_numtype, mk_num__0_num_(v_Inn, var_x)) + -- wf_uN: `%%`($size($numtype_addrtype(v_Inn)), var_x) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule num__case_1{v_numtype : numtype, v_Fnn : Fnn, var_x : fN}: + `%%`(v_numtype, mk_num__1_num_(v_Fnn, var_x)) + -- wf_fN: `%%`($sizenn($numtype_Fnn(v_Fnn)), var_x) + -- if (v_numtype = $numtype_Fnn(v_Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__0(var_x : num_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{v_Inn : Inn, var_x : iN}(mk_num__0_num_(v_Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__0{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_num__1(var_x : num_) : fN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{v_Fnn : Fnn, var_x : fN}(mk_num__1_num_(v_Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_num__1{var_x : num_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax pack_ = iN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lane_ = + | mk_lane__0(v_numtype : numtype, var_x : num_) + | mk_lane__1(v_packtype : packtype, var_x : pack_) + | mk_lane__2(v_Jnn : Jnn, var_x : iN) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lane_: `%%`(lanetype, lane_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_0{v_lanetype : lanetype, v_numtype : numtype, var_x : num_}: + `%%`(v_lanetype, mk_lane__0_lane_(v_numtype, var_x)) + -- wf_num_: `%%`(v_numtype, var_x) + -- if (v_lanetype = $lanetype_numtype(v_numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_1{v_lanetype : lanetype, v_packtype : packtype, var_x : pack_}: + `%%`(v_lanetype, mk_lane__1_lane_(v_packtype, var_x)) + -- wf_uN: `%%`($psize(v_packtype), var_x) + -- if (v_lanetype = $lanetype_packtype(v_packtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lane__case_2{v_lanetype : lanetype, v_Jnn : Jnn, var_x : iN}: + `%%`(v_lanetype, mk_lane__2_lane_(v_Jnn, var_x)) + -- wf_uN: `%%`($lsize($lanetype_Jnn(v_Jnn)), var_x) + -- if (v_lanetype = $lanetype_Jnn(v_Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__0(var_x : lane_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{v_numtype : numtype, var_x : num_}(mk_lane__0_lane_(v_numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__0{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__1(var_x : lane_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{v_packtype : packtype, var_x : pack_}(mk_lane__1_lane_(v_packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__1{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lane__2(var_x : lane_) : iN? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{v_Jnn : Jnn, var_x : iN}(mk_lane__2_lane_(v_Jnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lane__2{var_x : lane_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vec_ = vN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax lit_ = + | mk_lit__0(v_numtype : numtype, var_x : num_) + | mk_lit__1(v_vectype : vectype, var_x : vec_) + | mk_lit__2(v_packtype : packtype, var_x : pack_) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_lit_: `%%`(storagetype, lit_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_0{v_storagetype : storagetype, v_numtype : numtype, var_x : num_}: + `%%`(v_storagetype, mk_lit__0_lit_(v_numtype, var_x)) + -- wf_num_: `%%`(v_numtype, var_x) + -- if (v_storagetype = $storagetype_numtype(v_numtype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_1{v_storagetype : storagetype, v_vectype : vectype, var_x : vec_}: + `%%`(v_storagetype, mk_lit__1_lit_(v_vectype, var_x)) + -- wf_uN: `%%`(128, var_x) + -- if (v_storagetype = $storagetype_vectype(v_vectype)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule lit__case_2{v_storagetype : storagetype, v_packtype : packtype, var_x : pack_}: + `%%`(v_storagetype, mk_lit__2_lit_(v_packtype, var_x)) + -- wf_uN: `%%`($psize(v_packtype), var_x) + -- if (v_storagetype = $storagetype_packtype(v_packtype)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__0(var_x : lit_) : num_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{v_numtype : numtype, var_x : num_}(mk_lit__0_lit_(v_numtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__0{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__1(var_x : lit_) : vec_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{v_vectype : vectype, var_x : vec_}(mk_lit__1_lit_(v_vectype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__1{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_lit__2(var_x : lit_) : pack_? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{v_packtype : packtype, var_x : pack_}(mk_lit__2_lit_(v_packtype, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_lit__2{var_x : lit_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sz = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_sz_0(x : sz) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_sz_0{v_num_0 : nat}(`%`_sz(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_sz: `%`(sz,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule sz_case_0{i : nat}: + `%`(`%`_sz(i,),) + -- if ((((i = 8) \/ (i = 16)) \/ (i = 32)) \/ (i = 64)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax sx = + | U + | S + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Inn = + | CLZ + | CTZ + | POPCNT + | EXTEND(v_sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_Inn: `%%`(Inn, unop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_0{v_Inn : Inn}: + `%%`(v_Inn, CLZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_1{v_Inn : Inn}: + `%%`(v_Inn, CTZ_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_2{v_Inn : Inn}: + `%%`(v_Inn, POPCNT_unop_Inn) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop_Inn_case_3{v_Inn : Inn, v_sz : sz}: + `%%`(v_Inn, EXTEND_unop_Inn(v_sz,)) + -- wf_sz: `%`(v_sz,) + -- if ($proj_sz_0(v_sz).0 < $sizenn($numtype_addrtype(v_Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_Fnn = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax unop_ = + | mk_unop__0(v_Inn : Inn, var_x : unop_Inn) + | mk_unop__1(v_Fnn : Fnn, var_x : unop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_unop_: `%%`(numtype, unop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : unop_Inn}: + `%%`(v_numtype, mk_unop__0_unop_(v_Inn, var_x)) + -- wf_unop_Inn: `%%`(v_Inn, var_x) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule unop__case_1{v_numtype : numtype, v_Fnn : Fnn, var_x : unop_Fnn}: + `%%`(v_numtype, mk_unop__1_unop_(v_Fnn, var_x)) + -- if (v_numtype = $numtype_Fnn(v_Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__0(var_x : unop_) : unop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{v_Inn : Inn, var_x : unop_Inn}(mk_unop__0_unop_(v_Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__0{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_unop__1(var_x : unop_) : unop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{v_Fnn : Fnn, var_x : unop_Fnn}(mk_unop__1_unop_(v_Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_unop__1{var_x : unop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Inn = + | ADD + | SUB + | MUL + | DIV(sx) + | REM(sx) + | AND + | OR + | XOR + | SHL + | SHR(sx) + | ROTL + | ROTR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_Fnn = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | COPYSIGN + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax binop_ = + | mk_binop__0(v_Inn : Inn, var_x : binop_Inn) + | mk_binop__1(v_Fnn : Fnn, var_x : binop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_binop_: `%%`(numtype, binop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : binop_Inn}: + `%%`(v_numtype, mk_binop__0_binop_(v_Inn, var_x)) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule binop__case_1{v_numtype : numtype, v_Fnn : Fnn, var_x : binop_Fnn}: + `%%`(v_numtype, mk_binop__1_binop_(v_Fnn, var_x)) + -- if (v_numtype = $numtype_Fnn(v_Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__0(var_x : binop_) : binop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{v_Inn : Inn, var_x : binop_Inn}(mk_binop__0_binop_(v_Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__0{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_binop__1(var_x : binop_) : binop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{v_Fnn : Fnn, var_x : binop_Fnn}(mk_binop__1_binop_(v_Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_binop__1{var_x : binop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_Inn = + | EQZ + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax testop_ = + | mk_testop__0(v_Inn : Inn, var_x : testop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_testop_: `%%`(numtype, testop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule testop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : testop_Inn}: + `%%`(v_numtype, mk_testop__0_testop_(v_Inn, var_x)) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_testop__0(var_x : testop_) : testop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_testop__0{v_Inn : Inn, var_x : testop_Inn}(mk_testop__0_testop_(v_Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Inn = + | EQ + | NE + | LT(sx) + | GT(sx) + | LE(sx) + | GE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_Fnn = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax relop_ = + | mk_relop__0(v_Inn : Inn, var_x : relop_Inn) + | mk_relop__1(v_Fnn : Fnn, var_x : relop_Fnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_relop_: `%%`(numtype, relop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : relop_Inn}: + `%%`(v_numtype, mk_relop__0_relop_(v_Inn, var_x)) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule relop__case_1{v_numtype : numtype, v_Fnn : Fnn, var_x : relop_Fnn}: + `%%`(v_numtype, mk_relop__1_relop_(v_Fnn, var_x)) + -- if (v_numtype = $numtype_Fnn(v_Fnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__0(var_x : relop_) : relop_Inn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{v_Inn : Inn, var_x : relop_Inn}(mk_relop__0_relop_(v_Inn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__0{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_relop__1(var_x : relop_) : relop_Fnn? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{v_Fnn : Fnn, var_x : relop_Fnn}(mk_relop__1_relop_(v_Fnn, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_relop__1{var_x : relop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Inn_2 = + | EXTEND(sx) + | WRAP + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Inn_2: `%%%`(Inn, Inn, cvtop__Inn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_0{Inn_1 : Inn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Inn_1, Inn_2, EXTEND_cvtop__Inn_1_Inn_2(var_0)) + -- if ($sizenn1($numtype_addrtype(Inn_1)) < $sizenn2($numtype_addrtype(Inn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Inn_2_case_1{Inn_1 : Inn, Inn_2 : Inn}: + `%%%`(Inn_1, Inn_2, WRAP_cvtop__Inn_1_Inn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) > $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Inn_1_Fnn_2 = + | CONVERT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn, Fnn, cvtop__Inn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_0{Inn_1 : Inn, Fnn_2 : Fnn, var_0 : sx}: + `%%%`(Inn_1, Fnn_2, CONVERT_cvtop__Inn_1_Fnn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Inn_1_Fnn_2_case_1{Inn_1 : Inn, Fnn_2 : Fnn}: + `%%%`(Inn_1, Fnn_2, REINTERPRET_cvtop__Inn_1_Fnn_2) + -- if ($sizenn1($numtype_addrtype(Inn_1)) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Inn_2 = + | TRUNC(sx) + | TRUNC_SAT(sx) + | REINTERPRET + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn, Inn, cvtop__Fnn_1_Inn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_0{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_1{Fnn_1 : Fnn, Inn_2 : Inn, var_0 : sx}: + `%%%`(Fnn_1, Inn_2, TRUNC_SAT_cvtop__Fnn_1_Inn_2(var_0)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Inn_2_case_2{Fnn_1 : Fnn, Inn_2 : Inn}: + `%%%`(Fnn_1, Inn_2, REINTERPRET_cvtop__Fnn_1_Inn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = $sizenn2($numtype_addrtype(Inn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__Fnn_1_Fnn_2 = + | PROMOTE + | DEMOTE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn, Fnn, cvtop__Fnn_1_Fnn_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_0{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, PROMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) < $sizenn2($numtype_Fnn(Fnn_2))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop__Fnn_1_Fnn_2_case_1{Fnn_1 : Fnn, Fnn_2 : Fnn}: + `%%%`(Fnn_1, Fnn_2, DEMOTE_cvtop__Fnn_1_Fnn_2) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) > $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax cvtop__ = + | mk_cvtop___0(Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2) + | mk_cvtop___1(Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2) + | mk_cvtop___2(Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2) + | mk_cvtop___3(Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_cvtop__: `%%%`(numtype, numtype, cvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_0{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) + -- wf_cvtop__Inn_1_Inn_2: `%%%`(Inn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_1{numtype_1 : numtype, numtype_2 : numtype, Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) + -- wf_cvtop__Inn_1_Fnn_2: `%%%`(Inn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_addrtype(Inn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_2{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) + -- wf_cvtop__Fnn_1_Inn_2: `%%%`(Fnn_1, Inn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_addrtype(Inn_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule cvtop___case_3{numtype_1 : numtype, numtype_2 : numtype, Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}: + `%%%`(numtype_1, numtype_2, mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) + -- wf_cvtop__Fnn_1_Fnn_2: `%%%`(Fnn_1, Fnn_2, var_x) + -- if (numtype_1 = $numtype_Fnn(Fnn_1)) + -- if (numtype_2 = $numtype_Fnn(Fnn_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___0(var_x : cvtop__) : cvtop__Inn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{Inn_1 : Inn, Inn_2 : Inn, var_x : cvtop__Inn_1_Inn_2}(mk_cvtop___0_cvtop__(Inn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___0{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___1(var_x : cvtop__) : cvtop__Inn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{Inn_1 : Inn, Fnn_2 : Fnn, var_x : cvtop__Inn_1_Fnn_2}(mk_cvtop___1_cvtop__(Inn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___1{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___2(var_x : cvtop__) : cvtop__Fnn_1_Inn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{Fnn_1 : Fnn, Inn_2 : Inn, var_x : cvtop__Fnn_1_Inn_2}(mk_cvtop___2_cvtop__(Fnn_1, Inn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___2{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_cvtop___3(var_x : cvtop__) : cvtop__Fnn_1_Fnn_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{Fnn_1 : Fnn, Fnn_2 : Fnn, var_x : cvtop__Fnn_1_Fnn_2}(mk_cvtop___3_cvtop__(Fnn_1, Fnn_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_cvtop___3{var_x : cvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax dim = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_dim_0(x : dim) : (nat,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_dim_0{v_num_0 : nat}(`%`_dim(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_dim: `%`(dim,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule dim_case_0{i : nat}: + `%`(`%`_dim(i,),) + -- if (((((i = 1) \/ (i = 2)) \/ (i = 4)) \/ (i = 8)) \/ (i = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax shape = + | `%X%`(v_lanetype : lanetype, v_dim : dim) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_shape: `%`(shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule shape_case_0{v_lanetype : lanetype, v_dim : dim}: + `%`(`%X%`_shape(v_lanetype, v_dim),) + -- wf_dim: `%`(v_dim,) + -- if (($lsize(v_lanetype) * $proj_dim_0(v_dim).0) = 128) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax M = dim + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $fun_dim(v_shape : shape) : dim + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $fun_dim{v_Lnn : lanetype, v_M : dim}(`%X%`_shape(v_Lnn, v_M)) = v_M + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $fun_lanetype(v_shape : shape) : lanetype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $fun_lanetype{v_Lnn : lanetype, v_M : dim}(`%X%`_shape(v_Lnn, v_M)) = v_Lnn + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $unpackshape(v_shape : shape) : numtype + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $unpackshape{v_Lnn : lanetype, v_M : dim}(`%X%`_shape(v_Lnn, v_M)) = $lunpack(v_Lnn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax ishape = + | `%`(v_shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_ishape_0(x : ishape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_ishape_0{v_shape_0 : shape}(`%`_ishape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_ishape: `%`(ishape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule ishape_case_0{v_Jnn : Jnn, v_shape : shape}: + `%`(`%`_ishape(v_shape,),) + -- wf_shape: `%`(v_shape,) + -- if ($fun_lanetype(v_shape) = $lanetype_Jnn(v_Jnn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax bshape = + | `%`(v_shape : shape,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_bshape_0(x : bshape) : (shape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_bshape_0{v_shape_0 : shape}(`%`_bshape(v_shape_0,)) = (v_shape_0,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_bshape: `%`(bshape,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule bshape_case_0{v_shape : shape}: + `%`(`%`_bshape(v_shape,),) + -- wf_shape: `%`(v_shape,) + -- if ($fun_lanetype(v_shape) = I8_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax zero = + | ZERO + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax half = + | LOW + | HIGH + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvunop = + | NOT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvbinop = + | AND + | ANDNOT + | OR + | XOR + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvternop = + | BITSELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vvtestop = + | ANY_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Jnn_M = + | ABS + | NEG + | POPCNT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_Jnn_M: `%%%`(Jnn, M, vunop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_0{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, ABS_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_1{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, NEG_vunop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop_Jnn_M_case_2{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, POPCNT_vunop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) = 8) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_Fnn_M = + | ABS + | NEG + | SQRT + | CEIL + | FLOOR + | TRUNC + | NEAREST + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vunop_ = + | mk_vunop__0(v_Jnn : Jnn, v_M : M, var_x : vunop_Jnn_M) + | mk_vunop__1(v_Fnn : Fnn, v_M : M, var_x : vunop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vunop_: `%%`(shape, vunop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_0{v_shape : shape, v_Jnn : Jnn, v_M : M, var_x : vunop_Jnn_M}: + `%%`(v_shape, mk_vunop__0_vunop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- wf_vunop_Jnn_M: `%%%`(v_Jnn, v_M, var_x) + -- if (v_shape = `%X%`_shape($lanetype_Jnn(v_Jnn), v_M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vunop__case_1{v_shape : shape, v_Fnn : Fnn, v_M : M, var_x : vunop_Fnn_M}: + `%%`(v_shape, mk_vunop__1_vunop_(v_Fnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Fnn(v_Fnn), v_M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__0(var_x : vunop_) : vunop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{v_Jnn : Jnn, v_M : M, var_x : vunop_Jnn_M}(mk_vunop__0_vunop_(v_Jnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__0{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vunop__1(var_x : vunop_) : vunop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{v_Fnn : Fnn, v_M : M, var_x : vunop_Fnn_M}(mk_vunop__1_vunop_(v_Fnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vunop__1{var_x : vunop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Jnn_M = + | ADD + | SUB + | ADD_SAT(sx) + | SUB_SAT(sx) + | MUL + | AVGRU + | Q15MULR_SATS + | RELAXED_Q15MULRS + | MIN(sx) + | MAX(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_Jnn_M: `%%%`(Jnn, M, vbinop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_0{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, ADD_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_1{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, SUB_vbinop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_2{v_Jnn : Jnn, v_M : M, var_0 : sx}: + `%%%`(v_Jnn, v_M, ADD_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_3{v_Jnn : Jnn, v_M : M, var_0 : sx}: + `%%%`(v_Jnn, v_M, SUB_SAT_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_4{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, MUL_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) >= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_5{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, AVGRU_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) <= 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_6{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, Q15MULR_SATS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_7{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, RELAXED_Q15MULRS_vbinop_Jnn_M) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) = 16) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_8{v_Jnn : Jnn, v_M : M, var_0 : sx}: + `%%%`(v_Jnn, v_M, MIN_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) <= 32) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop_Jnn_M_case_9{v_Jnn : Jnn, v_M : M, var_0 : sx}: + `%%%`(v_Jnn, v_M, MAX_vbinop_Jnn_M(var_0)) + -- if ($lsizenn($lanetype_Jnn(v_Jnn)) <= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_Fnn_M = + | ADD + | SUB + | MUL + | DIV + | MIN + | MAX + | PMIN + | PMAX + | RELAXED_MIN + | RELAXED_MAX + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vbinop_ = + | mk_vbinop__0(v_Jnn : Jnn, v_M : M, var_x : vbinop_Jnn_M) + | mk_vbinop__1(v_Fnn : Fnn, v_M : M, var_x : vbinop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vbinop_: `%%`(shape, vbinop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_0{v_shape : shape, v_Jnn : Jnn, v_M : M, var_x : vbinop_Jnn_M}: + `%%`(v_shape, mk_vbinop__0_vbinop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- wf_vbinop_Jnn_M: `%%%`(v_Jnn, v_M, var_x) + -- if (v_shape = `%X%`_shape($lanetype_Jnn(v_Jnn), v_M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vbinop__case_1{v_shape : shape, v_Fnn : Fnn, v_M : M, var_x : vbinop_Fnn_M}: + `%%`(v_shape, mk_vbinop__1_vbinop_(v_Fnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Fnn(v_Fnn), v_M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__0(var_x : vbinop_) : vbinop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{v_Jnn : Jnn, v_M : M, var_x : vbinop_Jnn_M}(mk_vbinop__0_vbinop_(v_Jnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__0{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vbinop__1(var_x : vbinop_) : vbinop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{v_Fnn : Fnn, v_M : M, var_x : vbinop_Fnn_M}(mk_vbinop__1_vbinop_(v_Fnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vbinop__1{var_x : vbinop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Jnn_M = + | RELAXED_LANESELECT + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_Fnn_M = + | RELAXED_MADD + | RELAXED_NMADD + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vternop_ = + | mk_vternop__0(v_Jnn : Jnn, v_M : M, var_x : vternop_Jnn_M) + | mk_vternop__1(v_Fnn : Fnn, v_M : M, var_x : vternop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vternop_: `%%`(shape, vternop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_0{v_shape : shape, v_Jnn : Jnn, v_M : M, var_x : vternop_Jnn_M}: + `%%`(v_shape, mk_vternop__0_vternop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Jnn(v_Jnn), v_M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vternop__case_1{v_shape : shape, v_Fnn : Fnn, v_M : M, var_x : vternop_Fnn_M}: + `%%`(v_shape, mk_vternop__1_vternop_(v_Fnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Fnn(v_Fnn), v_M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__0(var_x : vternop_) : vternop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{v_Jnn : Jnn, v_M : M, var_x : vternop_Jnn_M}(mk_vternop__0_vternop_(v_Jnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__0{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vternop__1(var_x : vternop_) : vternop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{v_Fnn : Fnn, v_M : M, var_x : vternop_Fnn_M}(mk_vternop__1_vternop_(v_Fnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vternop__1{var_x : vternop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_Jnn_M = + | ALL_TRUE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vtestop_ = + | mk_vtestop__0(v_Jnn : Jnn, v_M : M, var_x : vtestop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vtestop_: `%%`(shape, vtestop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vtestop__case_0{v_shape : shape, v_Jnn : Jnn, v_M : M, var_x : vtestop_Jnn_M}: + `%%`(v_shape, mk_vtestop__0_vtestop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Jnn(v_Jnn), v_M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vtestop__0(var_x : vtestop_) : vtestop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vtestop__0{v_Jnn : Jnn, v_M : M, var_x : vtestop_Jnn_M}(mk_vtestop__0_vtestop_(v_Jnn, v_M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Jnn_M = + | EQ + | NE + | LT(v_sx : sx,) + | GT(v_sx : sx,) + | LE(v_sx : sx,) + | GE(v_sx : sx,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_Jnn_M: `%%%`(Jnn, M, vrelop_Jnn_M) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_0{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, EQ_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_1{v_Jnn : Jnn, v_M : M}: + `%%%`(v_Jnn, v_M, NE_vrelop_Jnn_M) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_2{v_Jnn : Jnn, v_M : M, v_sx : sx}: + `%%%`(v_Jnn, v_M, LT_vrelop_Jnn_M(v_sx,)) + -- if (($lsizenn($lanetype_Jnn(v_Jnn)) =/= 64) \/ (v_sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_3{v_Jnn : Jnn, v_M : M, v_sx : sx}: + `%%%`(v_Jnn, v_M, GT_vrelop_Jnn_M(v_sx,)) + -- if (($lsizenn($lanetype_Jnn(v_Jnn)) =/= 64) \/ (v_sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_4{v_Jnn : Jnn, v_M : M, v_sx : sx}: + `%%%`(v_Jnn, v_M, LE_vrelop_Jnn_M(v_sx,)) + -- if (($lsizenn($lanetype_Jnn(v_Jnn)) =/= 64) \/ (v_sx = S_sx)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop_Jnn_M_case_5{v_Jnn : Jnn, v_M : M, v_sx : sx}: + `%%%`(v_Jnn, v_M, GE_vrelop_Jnn_M(v_sx,)) + -- if (($lsizenn($lanetype_Jnn(v_Jnn)) =/= 64) \/ (v_sx = S_sx)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_Fnn_M = + | EQ + | NE + | LT + | GT + | LE + | GE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vrelop_ = + | mk_vrelop__0(v_Jnn : Jnn, v_M : M, var_x : vrelop_Jnn_M) + | mk_vrelop__1(v_Fnn : Fnn, v_M : M, var_x : vrelop_Fnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vrelop_: `%%`(shape, vrelop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_0{v_shape : shape, v_Jnn : Jnn, v_M : M, var_x : vrelop_Jnn_M}: + `%%`(v_shape, mk_vrelop__0_vrelop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- wf_vrelop_Jnn_M: `%%%`(v_Jnn, v_M, var_x) + -- if (v_shape = `%X%`_shape($lanetype_Jnn(v_Jnn), v_M)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vrelop__case_1{v_shape : shape, v_Fnn : Fnn, v_M : M, var_x : vrelop_Fnn_M}: + `%%`(v_shape, mk_vrelop__1_vrelop_(v_Fnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_shape = `%X%`_shape($lanetype_Fnn(v_Fnn), v_M)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__0(var_x : vrelop_) : vrelop_Jnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{v_Jnn : Jnn, v_M : M, var_x : vrelop_Jnn_M}(mk_vrelop__0_vrelop_(v_Jnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__0{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vrelop__1(var_x : vrelop_) : vrelop_Fnn_M? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{v_Fnn : Fnn, v_M : M, var_x : vrelop_Fnn_M}(mk_vrelop__1_vrelop_(v_Fnn, v_M, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vrelop__1{var_x : vrelop_}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_Jnn_M = + | SHL + | SHR(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vshiftop_ = + | mk_vshiftop__0(v_Jnn : Jnn, v_M : M, var_x : vshiftop_Jnn_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vshiftop_: `%%`(ishape, vshiftop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vshiftop__case_0{v_ishape : ishape, v_Jnn : Jnn, v_M : M, var_x : vshiftop_Jnn_M}: + `%%`(v_ishape, mk_vshiftop__0_vshiftop_(v_Jnn, v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_ishape = `%`_ishape(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vshiftop__0(var_x : vshiftop_) : vshiftop_Jnn_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vshiftop__0{v_Jnn : Jnn, v_M : M, var_x : vshiftop_Jnn_M}(mk_vshiftop__0_vshiftop_(v_Jnn, v_M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_M = + | SWIZZLE + | RELAXED_SWIZZLE + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vswizzlop_ = + | mk_vswizzlop__0(v_M : M, var_x : vswizzlop_M) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vswizzlop_: `%%`(bshape, vswizzlop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vswizzlop__case_0{v_bshape : bshape, v_M : M, var_x : vswizzlop_M}: + `%%`(v_bshape, mk_vswizzlop__0_vswizzlop_(v_M, var_x)) + -- wf_dim: `%`(v_M,) + -- if (v_bshape = `%`_bshape(`%X%`_shape(I8_lanetype, v_M),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vswizzlop__0(var_x : vswizzlop_) : vswizzlop_M + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vswizzlop__0{v_M : M, var_x : vswizzlop_M}(mk_vswizzlop__0_vswizzlop_(v_M, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTADD_PAIRWISE(sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextunop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_0 : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(var_0)) + -- if ((16 <= (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) <= 32))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextunop__ = + | mk_vextunop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextunop__: `%%%`(ishape, ishape, vextunop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextunop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextunop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextunop___0(var_x : vextunop__) : vextunop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextunop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextunop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextunop___0_vextunop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTMUL(v_half : half, v_sx : sx) + | DOTS + | RELAXED_DOTS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextbinop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_half : half, v_sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) >= 16)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_1{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop__Jnn_1_M_1_Jnn_2_M_2_case_2{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((2 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 16)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextbinop__ = + | mk_vextbinop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextbinop__: `%%%`(ishape, ishape, vextbinop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextbinop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextbinop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextbinop___0(var_x : vextbinop__) : vextbinop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextbinop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextbinop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextbinop___0_vextbinop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__Jnn_1_M_1_Jnn_2_M_2 = + | RELAXED_DOT_ADDS + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vextternop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2) + -- if (((4 * $lsizenn1($lanetype_Jnn(Jnn_1))) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vextternop__ = + | mk_vextternop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vextternop__: `%%%`(ishape, ishape, vextternop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vextternop___case_0{ishape_1 : ishape, ishape_2 : ishape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(ishape_1, ishape_2, mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vextternop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (ishape_1 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_1), M_1),)) + -- if (ishape_2 = `%`_ishape(`%X%`_shape($lanetype_Jnn(Jnn_2), M_2),)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vextternop___0(var_x : vextternop__) : vextternop__Jnn_1_M_1_Jnn_2_M_2 + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vextternop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vextternop__Jnn_1_M_1_Jnn_2_M_2}(mk_vextternop___0_vextternop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Jnn_2_M_2 = + | EXTEND(v_half : half, v_sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn, M, Jnn, M, vcvtop__Jnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Jnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_half : half, v_sx : sx}: + `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)) + -- if ($lsizenn2($lanetype_Jnn(Jnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Jnn_1_M_1_Fnn_2_M_2 = + | CONVERT(half_opt : half?, v_sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn, M, Fnn, M, vcvtop__Jnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Jnn_1_M_1_Fnn_2_M_2_case_0{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, half_opt : half?, v_sx : sx}: + `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)) + -- if (((($sizenn2($numtype_Fnn(Fnn_2)) = $lsizenn1($lanetype_Jnn(Jnn_1))) /\ ($lsizenn1($lanetype_Jnn(Jnn_1)) = 32)) /\ (half_opt = ?())) \/ (($sizenn2($numtype_Fnn(Fnn_2)) = (2 * $lsizenn1($lanetype_Jnn(Jnn_1)))) /\ (half_opt = ?(LOW_half)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Jnn_2_M_2 = + | TRUNC_SAT(v_sx : sx, zero_opt : zero?) + | RELAXED_TRUNC(v_sx : sx, zero_opt : zero?) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn, M, Jnn, M, vcvtop__Fnn_1_M_1_Jnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_sx : sx, zero_opt : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero_opt = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero_opt = ?(ZERO_zero)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Jnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, v_sx : sx, zero_opt : zero?}: + `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)) + -- if (((($sizenn1($numtype_Fnn(Fnn_1)) = $lsizenn2($lanetype_Jnn(Jnn_2))) /\ ($lsizenn2($lanetype_Jnn(Jnn_2)) = 32)) /\ (zero_opt = ?())) \/ (($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $lsizenn2($lanetype_Jnn(Jnn_2)))) /\ (zero_opt = ?(ZERO_zero)))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__Fnn_1_M_1_Fnn_2_M_2 = + | DEMOTE(zero) + | PROMOTELOW + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn, M, Fnn, M, vcvtop__Fnn_1_M_1_Fnn_2_M_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_0{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_0 : zero}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(var_0)) + -- if ($sizenn1($numtype_Fnn(Fnn_1)) = (2 * $sizenn2($numtype_Fnn(Fnn_2)))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop__Fnn_1_M_1_Fnn_2_M_2_case_1{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M}: + `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2) + -- if ((2 * $sizenn1($numtype_Fnn(Fnn_1))) = $sizenn2($numtype_Fnn(Fnn_2))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vcvtop__ = + | mk_vcvtop___0(Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___1(Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2) + | mk_vcvtop___2(Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2) + | mk_vcvtop___3(Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vcvtop__: `%%%`(shape, shape, vcvtop__) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_0{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Jnn_2_M_2: `%%%%%`(Jnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_1{shape_1 : shape, shape_2 : shape, Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Jnn_1_M_1_Fnn_2_M_2: `%%%%%`(Jnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Jnn(Jnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_2{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Jnn_2_M_2: `%%%%%`(Fnn_1, M_1, Jnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Jnn(Jnn_2), M_2)) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vcvtop___case_3{shape_1 : shape, shape_2 : shape, Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}: + `%%%`(shape_1, shape_2, mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) + -- wf_dim: `%`(M_1,) + -- wf_dim: `%`(M_2,) + -- wf_vcvtop__Fnn_1_M_1_Fnn_2_M_2: `%%%%%`(Fnn_1, M_1, Fnn_2, M_2, var_x) + -- if (shape_1 = `%X%`_shape($lanetype_Fnn(Fnn_1), M_1)) + -- if (shape_2 = `%X%`_shape($lanetype_Fnn(Fnn_2), M_2)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___0(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{Jnn_1 : Jnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___0_vcvtop__(Jnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___0{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___1(var_x : vcvtop__) : vcvtop__Jnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{Jnn_1 : Jnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Jnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___1_vcvtop__(Jnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___1{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___2(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Jnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{Fnn_1 : Fnn, M_1 : M, Jnn_2 : Jnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Jnn_2_M_2}(mk_vcvtop___2_vcvtop__(Fnn_1, M_1, Jnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___2{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_vcvtop___3(var_x : vcvtop__) : vcvtop__Fnn_1_M_1_Fnn_2_M_2? + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{Fnn_1 : Fnn, M_1 : M, Fnn_2 : Fnn, M_2 : M, var_x : vcvtop__Fnn_1_M_1_Fnn_2_M_2}(mk_vcvtop___3_vcvtop__(Fnn_1, M_1, Fnn_2, M_2, var_x)) = ?(var_x) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_vcvtop___3{var_x : vcvtop__}(var_x) = ?() + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax memarg = +{ + ALIGN u32, + OFFSET u64 +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_memarg: `%`(memarg,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule memarg_case_{var_0 : u32, var_1 : u64}: + `%`({ALIGN var_0, OFFSET var_1},) + -- wf_uN: `%%`(32, var_0) + -- wf_uN: `%%`(64, var_1) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_Inn = + | `%_%`(v_sz : sz, v_sx : sx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_Inn: `%%`(Inn, loadop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop_Inn_case_0{v_Inn : Inn, v_sz : sz, v_sx : sx}: + `%%`(v_Inn, `%_%`_loadop_Inn(v_sz, v_sx)) + -- wf_sz: `%`(v_sz,) + -- if ($proj_sz_0(v_sz).0 < $sizenn($numtype_addrtype(v_Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax loadop_ = + | mk_loadop__0(v_Inn : Inn, var_x : loadop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_loadop_: `%%`(numtype, loadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule loadop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : loadop_Inn}: + `%%`(v_numtype, mk_loadop__0_loadop_(v_Inn, var_x)) + -- wf_loadop_Inn: `%%`(v_Inn, var_x) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_loadop__0(var_x : loadop_) : loadop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_loadop__0{v_Inn : Inn, var_x : loadop_Inn}(mk_loadop__0_loadop_(v_Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_Inn = + | `%`(v_sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_Inn: `%%`(Inn, storeop_Inn) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop_Inn_case_0{v_Inn : Inn, v_sz : sz}: + `%%`(v_Inn, `%`_storeop_Inn(v_sz,)) + -- wf_sz: `%`(v_sz,) + -- if ($proj_sz_0(v_sz).0 < $sizenn($numtype_addrtype(v_Inn))) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax storeop_ = + | mk_storeop__0(v_Inn : Inn, var_x : storeop_Inn) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_storeop_: `%%`(numtype, storeop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule storeop__case_0{v_numtype : numtype, v_Inn : Inn, var_x : storeop_Inn}: + `%%`(v_numtype, mk_storeop__0_storeop_(v_Inn, var_x)) + -- wf_storeop_Inn: `%%`(v_Inn, var_x) + -- if (v_numtype = $numtype_addrtype(v_Inn)) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $proj_storeop__0(var_x : storeop_) : storeop_Inn + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $proj_storeop__0{v_Inn : Inn, var_x : storeop_Inn}(mk_storeop__0_storeop_(v_Inn, var_x)) = var_x + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax vloadop_ = + | `SHAPE%X%_%`(v_sz : sz, v_M : M, v_sx : sx) + | SPLAT(sz) + | ZERO(v_sz : sz,) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_vloadop_: `%%`(vectype, vloadop_) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_0{v_vectype : vectype, v_sz : sz, v_M : M, v_sx : sx}: + `%%`(v_vectype, `SHAPE%X%_%`_vloadop_(v_sz, v_M, v_sx)) + -- wf_sz: `%`(v_sz,) + -- wf_dim: `%`(v_M,) + -- if ((($proj_sz_0(v_sz).0 * $proj_dim_0(v_M).0) : nat <:> rat) = (($vsize(v_vectype) : nat <:> rat) / (2 : nat <:> rat))) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_1{v_vectype : vectype, var_0 : sz}: + `%%`(v_vectype, SPLAT_vloadop_(var_0)) + -- wf_sz: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule vloadop__case_2{v_vectype : vectype, v_sz : sz}: + `%%`(v_vectype, ZERO_vloadop_(v_sz,)) + -- wf_sz: `%`(v_sz,) + -- if ($proj_sz_0(v_sz).0 >= 32) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax blocktype = + | _RESULT(valtype?) + | _IDX(typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_blocktype: `%`(blocktype,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_0{var_0 : valtype?}: + `%`(_RESULT_blocktype(var_0),) + -- (wf_valtype: `%`(var_0,))?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule blocktype_case_1{var_0 : typeidx}: + `%`(_IDX_blocktype(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax addr = nat + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayaddr = addr + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax catch = + | CATCH(v_tagidx : tagidx, v_labelidx : labelidx) + | CATCH_REF(v_tagidx : tagidx, v_labelidx : labelidx) + | CATCH_ALL(labelidx) + | CATCH_ALL_REF(labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +relation wf_catch: `%`(catch,) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_0{v_tagidx : tagidx, v_labelidx : labelidx}: + `%`(CATCH_catch(v_tagidx, v_labelidx),) + -- wf_uN: `%%`(32, v_tagidx) + -- wf_uN: `%%`(32, v_labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_1{v_tagidx : tagidx, v_labelidx : labelidx}: + `%`(CATCH_REF_catch(v_tagidx, v_labelidx),) + -- wf_uN: `%%`(32, v_tagidx) + -- wf_uN: `%%`(32, v_labelidx) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_2{var_0 : labelidx}: + `%`(CATCH_ALL_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + rule catch_case_3{var_0 : labelidx}: + `%`(CATCH_ALL_REF_catch(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exnaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax dataaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax elemaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globaladdr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax memaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tagaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax externaddr = + | TAG(tagaddr) + | GLOBAL(globaladdr) + | MEM(memaddr) + | TABLE(tableaddr) + | FUNC(funcaddr) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exportinst = +{ + NAME name, + ADDR externaddr +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exportinst: `%`(exportinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exportinst_case_{var_0 : name, var_1 : externaddr}: + `%`({NAME var_0, ADDR var_1},) + -- wf_name: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax moduleinst = +{ + TYPES deftype*, + TAGS tagaddr*, + GLOBALS globaladdr*, + MEMS memaddr*, + TABLES tableaddr*, + FUNCS funcaddr*, + DATAS dataaddr*, + ELEMS elemaddr*, + EXPORTS exportinst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_moduleinst: `%`(moduleinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule moduleinst_case_{var_0 : deftype*, var_1 : tagaddr*, var_2 : globaladdr*, var_3 : memaddr*, var_4 : tableaddr*, var_5 : funcaddr*, var_6 : dataaddr*, var_7 : elemaddr*, var_8 : exportinst*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, EXPORTS var_8},) + -- (wf_exportinst: `%`(var_8,))*{var_8 <- var_8} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structaddr = addr + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.1-43.19 +syntax ref = + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 +relation wf_ref: `%`(ref,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_0{var_0 : u31}: + `%`(`REF.I31_NUM`_ref(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_1: + `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_2{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_3{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_4{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_5{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_6{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_ref(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:35.8-35.11 + rule ref_case_7{var_0 : ref}: + `%`(`REF.EXTERN`_ref(var_0),) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax val = + | CONST(v_numtype : numtype, num_) + | VCONST(v_vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + +def $val_ref(var_0 : ref) : val + def $val_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_val(x) + def $val_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_val + def $val_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_val(x) + def $val_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_val(x) + def $val_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_val(x) + def $val_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_val(x) + def $val_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_val(x) + def $val_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_val(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_val: `%`(val,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_0{v_numtype : numtype, var_0 : num_}: + `%`(CONST_val(v_numtype, var_0),) + -- wf_num_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_1{v_vectype : vectype, var_0 : vec_}: + `%`(VCONST_val(v_vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_val(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_3: + `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_val(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule val_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_val(var_0),) + -- wf_ref: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax frame = +{ + LOCALS val?*, + MODULE moduleinst +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_frame: `%`(frame,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule frame_case_{var_0 : val?*, var_1 : moduleinst}: + `%`({LOCALS var_0, MODULE var_1},) + -- (wf_val: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- wf_moduleinst: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.1-139.9 +syntax instr = + | NOP + | UNREACHABLE + | DROP + | SELECT(valtype*?) + | BLOCK(v_blocktype : blocktype, instr_lst : instr*) + | LOOP(v_blocktype : blocktype, instr_lst : instr*) + | `IF%%ELSE%`(v_blocktype : blocktype, instr_lst : instr*, instr_lst : instr*) + | BR(labelidx) + | BR_IF(labelidx) + | BR_TABLE(labelidx_lst : labelidx*, v_labelidx : labelidx) + | BR_ON_NULL(labelidx) + | BR_ON_NON_NULL(labelidx) + | BR_ON_CAST(v_labelidx : labelidx, v_reftype : reftype, v_reftype : reftype) + | BR_ON_CAST_FAIL(v_labelidx : labelidx, v_reftype : reftype, v_reftype : reftype) + | CALL(funcidx) + | CALL_REF(typeuse) + | CALL_INDIRECT(v_tableidx : tableidx, v_typeuse : typeuse) + | RETURN + | RETURN_CALL(funcidx) + | RETURN_CALL_REF(typeuse) + | RETURN_CALL_INDIRECT(v_tableidx : tableidx, v_typeuse : typeuse) + | THROW(tagidx) + | THROW_REF + | TRY_TABLE(v_blocktype : blocktype, list(syntax catch), instr_lst : instr*) + | `LOCAL.GET`(localidx) + | `LOCAL.SET`(localidx) + | `LOCAL.TEE`(localidx) + | `GLOBAL.GET`(globalidx) + | `GLOBAL.SET`(globalidx) + | `TABLE.GET`(tableidx) + | `TABLE.SET`(tableidx) + | `TABLE.SIZE`(tableidx) + | `TABLE.GROW`(tableidx) + | `TABLE.FILL`(tableidx) + | `TABLE.COPY`(v_tableidx : tableidx, v_tableidx : tableidx) + | `TABLE.INIT`(v_tableidx : tableidx, v_elemidx : elemidx) + | `ELEM.DROP`(elemidx) + | LOAD(v_numtype : numtype, loadop_?, v_memidx : memidx, v_memarg : memarg) + | STORE(v_numtype : numtype, storeop_?, v_memidx : memidx, v_memarg : memarg) + | VLOAD(v_vectype : vectype, vloadop_?, v_memidx : memidx, v_memarg : memarg) + | VLOAD_LANE(v_vectype : vectype, v_sz : sz, v_memidx : memidx, v_memarg : memarg, v_laneidx : laneidx) + | VSTORE(v_vectype : vectype, v_memidx : memidx, v_memarg : memarg) + | VSTORE_LANE(v_vectype : vectype, v_sz : sz, v_memidx : memidx, v_memarg : memarg, v_laneidx : laneidx) + | `MEMORY.SIZE`(memidx) + | `MEMORY.GROW`(memidx) + | `MEMORY.FILL`(memidx) + | `MEMORY.COPY`(v_memidx : memidx, v_memidx : memidx) + | `MEMORY.INIT`(v_memidx : memidx, v_dataidx : dataidx) + | `DATA.DROP`(dataidx) + | `REF.NULL`(heaptype) + | `REF.IS_NULL` + | `REF.AS_NON_NULL` + | `REF.EQ` + | `REF.TEST`(reftype) + | `REF.CAST`(reftype) + | `REF.FUNC`(funcidx) + | `REF.I31` + | `I31.GET`(sx) + | `STRUCT.NEW`(typeidx) + | `STRUCT.NEW_DEFAULT`(typeidx) + | `STRUCT.GET`(sx_opt : sx?, v_typeidx : typeidx, v_fieldidx : fieldidx) + | `STRUCT.SET`(v_typeidx : typeidx, v_fieldidx : fieldidx) + | `ARRAY.NEW`(typeidx) + | `ARRAY.NEW_DEFAULT`(typeidx) + | `ARRAY.NEW_FIXED`(v_typeidx : typeidx, v_u32 : u32) + | `ARRAY.NEW_DATA`(v_typeidx : typeidx, v_dataidx : dataidx) + | `ARRAY.NEW_ELEM`(v_typeidx : typeidx, v_elemidx : elemidx) + | `ARRAY.GET`(sx_opt : sx?, v_typeidx : typeidx) + | `ARRAY.SET`(typeidx) + | `ARRAY.LEN` + | `ARRAY.FILL`(typeidx) + | `ARRAY.COPY`(v_typeidx : typeidx, v_typeidx : typeidx) + | `ARRAY.INIT_DATA`(v_typeidx : typeidx, v_dataidx : dataidx) + | `ARRAY.INIT_ELEM`(v_typeidx : typeidx, v_elemidx : elemidx) + | `EXTERN.CONVERT_ANY` + | `ANY.CONVERT_EXTERN` + | CONST(v_numtype : numtype, num_) + | UNOP(v_numtype : numtype, unop_) + | BINOP(v_numtype : numtype, binop_) + | TESTOP(v_numtype : numtype, testop_) + | RELOP(v_numtype : numtype, relop_) + | CVTOP(numtype_1 : numtype, numtype_2 : numtype, cvtop__) + | VCONST(v_vectype : vectype, vec_) + | VVUNOP(v_vectype : vectype, v_vvunop : vvunop) + | VVBINOP(v_vectype : vectype, v_vvbinop : vvbinop) + | VVTERNOP(v_vectype : vectype, v_vvternop : vvternop) + | VVTESTOP(v_vectype : vectype, v_vvtestop : vvtestop) + | VUNOP(v_shape : shape, vunop_) + | VBINOP(v_shape : shape, vbinop_) + | VTERNOP(v_shape : shape, vternop_) + | VTESTOP(v_shape : shape, vtestop_) + | VRELOP(v_shape : shape, vrelop_) + | VSHIFTOP(v_ishape : ishape, vshiftop_) + | VBITMASK(ishape) + | VSWIZZLOP(v_bshape : bshape, vswizzlop_) + | VSHUFFLE(v_bshape : bshape, laneidx_lst : laneidx*) + | VEXTUNOP(ishape_1 : ishape, ishape_2 : ishape, vextunop__) + | VEXTBINOP(ishape_1 : ishape, ishape_2 : ishape, vextbinop__) + | VEXTTERNOP(ishape_1 : ishape, ishape_2 : ishape, vextternop__) + | VNARROW(ishape_1 : ishape, ishape_2 : ishape, v_sx : sx) + | VCVTOP(shape_1 : shape, shape_2 : shape, vcvtop__) + | VSPLAT(shape) + | VEXTRACT_LANE(v_shape : shape, sx_opt : sx?, v_laneidx : laneidx) + | VREPLACE_LANE(v_shape : shape, v_laneidx : laneidx) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | `LABEL_%{%}%`(v_n : n, instr_lst : instr*, instr_lst : instr*) + | `FRAME_%{%}%`(v_n : n, v_frame : frame, instr_lst : instr*) + | `HANDLER_%{%}%`(v_n : n, catch_lst : catch*, instr_lst : instr*) + | TRAP +} + +def $instr_ref(var_0 : ref) : instr + def $instr_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_instr(x) + def $instr_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_instr + def $instr_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_instr(x) + +def $instr_val(var_0 : val) : instr + def $instr_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_instr(x0, x1) + def $instr_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_instr(x0, x1) + def $instr_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_instr(x) + def $instr_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_instr + def $instr_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_instr(x) + def $instr_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_instr(x) + def $instr_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_instr(x) + def $instr_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_instr(x) + def $instr_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_instr(x) + def $instr_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_instr(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 +relation wf_instr: `%`(instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_0: + `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_1: + `%`(UNREACHABLE_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_2: + `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_3{var_0 : valtype*?}: + `%`(SELECT_instr(var_0),) + -- (wf_valtype: `%`(var_0,))*{var_0 <- var_0}?{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_4{v_blocktype : blocktype, instr_lst : instr*}: + `%`(BLOCK_instr(v_blocktype, instr_lst),) + -- wf_blocktype: `%`(v_blocktype,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_5{v_blocktype : blocktype, instr_lst : instr*}: + `%`(LOOP_instr(v_blocktype, instr_lst),) + -- wf_blocktype: `%`(v_blocktype,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_6{v_blocktype : blocktype, instr_lst : instr*, instr_lst_0 : instr*}: + `%`(`IF%%ELSE%`_instr(v_blocktype, instr_lst, instr_lst_0),) + -- wf_blocktype: `%`(v_blocktype,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- (wf_instr: `%`(instr_lst_0,))*{instr_lst_0 <- instr_lst_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_7{var_0 : labelidx}: + `%`(BR_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_8{var_0 : labelidx}: + `%`(BR_IF_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_9{labelidx_lst : labelidx*, v_labelidx : labelidx}: + `%`(BR_TABLE_instr(labelidx_lst, v_labelidx),) + -- (wf_uN: `%%`(32, v_labelidx))*{v_labelidx <- labelidx_lst} + -- wf_uN: `%%`(32, v_labelidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_10{var_0 : labelidx}: + `%`(BR_ON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_11{var_0 : labelidx}: + `%`(BR_ON_NON_NULL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_12{v_labelidx : labelidx, v_reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_instr(v_labelidx, v_reftype, reftype_0),) + -- wf_uN: `%%`(32, v_labelidx) + -- wf_reftype: `%`(v_reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_13{v_labelidx : labelidx, v_reftype : reftype, reftype_0 : reftype}: + `%`(BR_ON_CAST_FAIL_instr(v_labelidx, v_reftype, reftype_0),) + -- wf_uN: `%%`(32, v_labelidx) + -- wf_reftype: `%`(v_reftype,) + -- wf_reftype: `%`(reftype_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_14{var_0 : funcidx}: + `%`(CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_15{var_0 : typeuse}: + `%`(CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_16{v_tableidx : tableidx, v_typeuse : typeuse}: + `%`(CALL_INDIRECT_instr(v_tableidx, v_typeuse),) + -- wf_uN: `%%`(32, v_tableidx) + -- wf_typeuse: `%`(v_typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_17: + `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_18{var_0 : funcidx}: + `%`(RETURN_CALL_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_19{var_0 : typeuse}: + `%`(RETURN_CALL_REF_instr(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_20{v_tableidx : tableidx, v_typeuse : typeuse}: + `%`(RETURN_CALL_INDIRECT_instr(v_tableidx, v_typeuse),) + -- wf_uN: `%%`(32, v_tableidx) + -- wf_typeuse: `%`(v_typeuse,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_21{var_0 : tagidx}: + `%`(THROW_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_22: + `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_23{v_blocktype : blocktype, var_0 : list(syntax catch), instr_lst : instr*}: + `%`(TRY_TABLE_instr(v_blocktype, var_0, instr_lst),) + -- wf_blocktype: `%`(v_blocktype,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_24{var_0 : localidx}: + `%`(`LOCAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_25{var_0 : localidx}: + `%`(`LOCAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_26{var_0 : localidx}: + `%`(`LOCAL.TEE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_27{var_0 : globalidx}: + `%`(`GLOBAL.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_28{var_0 : globalidx}: + `%`(`GLOBAL.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_29{var_0 : tableidx}: + `%`(`TABLE.GET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_30{var_0 : tableidx}: + `%`(`TABLE.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_31{var_0 : tableidx}: + `%`(`TABLE.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_32{var_0 : tableidx}: + `%`(`TABLE.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_33{var_0 : tableidx}: + `%`(`TABLE.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_34{v_tableidx : tableidx, tableidx_0 : tableidx}: + `%`(`TABLE.COPY`_instr(v_tableidx, tableidx_0),) + -- wf_uN: `%%`(32, v_tableidx) + -- wf_uN: `%%`(32, tableidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_35{v_tableidx : tableidx, v_elemidx : elemidx}: + `%`(`TABLE.INIT`_instr(v_tableidx, v_elemidx),) + -- wf_uN: `%%`(32, v_tableidx) + -- wf_uN: `%%`(32, v_elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_36{var_0 : elemidx}: + `%`(`ELEM.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_37{v_numtype : numtype, var_0 : loadop_?, v_memidx : memidx, v_memarg : memarg}: + `%`(LOAD_instr(v_numtype, var_0, v_memidx, v_memarg),) + -- (wf_loadop_: `%%`(v_numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_38{v_numtype : numtype, var_0 : storeop_?, v_memidx : memidx, v_memarg : memarg}: + `%`(STORE_instr(v_numtype, var_0, v_memidx, v_memarg),) + -- (wf_storeop_: `%%`(v_numtype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_39{v_vectype : vectype, var_0 : vloadop_?, v_memidx : memidx, v_memarg : memarg}: + `%`(VLOAD_instr(v_vectype, var_0, v_memidx, v_memarg),) + -- (wf_vloadop_: `%%`(v_vectype, var_0))?{var_0 <- var_0} + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_40{v_vectype : vectype, v_sz : sz, v_memidx : memidx, v_memarg : memarg, v_laneidx : laneidx}: + `%`(VLOAD_LANE_instr(v_vectype, v_sz, v_memidx, v_memarg, v_laneidx),) + -- wf_sz: `%`(v_sz,) + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + -- wf_uN: `%%`(8, v_laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_41{v_vectype : vectype, v_memidx : memidx, v_memarg : memarg}: + `%`(VSTORE_instr(v_vectype, v_memidx, v_memarg),) + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_42{v_vectype : vectype, v_sz : sz, v_memidx : memidx, v_memarg : memarg, v_laneidx : laneidx}: + `%`(VSTORE_LANE_instr(v_vectype, v_sz, v_memidx, v_memarg, v_laneidx),) + -- wf_sz: `%`(v_sz,) + -- wf_uN: `%%`(32, v_memidx) + -- wf_memarg: `%`(v_memarg,) + -- wf_uN: `%%`(8, v_laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_43{var_0 : memidx}: + `%`(`MEMORY.SIZE`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_44{var_0 : memidx}: + `%`(`MEMORY.GROW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_45{var_0 : memidx}: + `%`(`MEMORY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_46{v_memidx : memidx, memidx_0 : memidx}: + `%`(`MEMORY.COPY`_instr(v_memidx, memidx_0),) + -- wf_uN: `%%`(32, v_memidx) + -- wf_uN: `%%`(32, memidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_47{v_memidx : memidx, v_dataidx : dataidx}: + `%`(`MEMORY.INIT`_instr(v_memidx, v_dataidx),) + -- wf_uN: `%%`(32, v_memidx) + -- wf_uN: `%%`(32, v_dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_48{var_0 : dataidx}: + `%`(`DATA.DROP`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_49{var_0 : heaptype}: + `%`(`REF.NULL`_instr(var_0),) + -- wf_heaptype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_50: + `%`(`REF.IS_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_51: + `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_52: + `%`(`REF.EQ`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_53{var_0 : reftype}: + `%`(`REF.TEST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_54{var_0 : reftype}: + `%`(`REF.CAST`_instr(var_0),) + -- wf_reftype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_55{var_0 : funcidx}: + `%`(`REF.FUNC`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_56: + `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_57{var_0 : sx}: + `%`(`I31.GET`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_58{var_0 : typeidx}: + `%`(`STRUCT.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_59{var_0 : typeidx}: + `%`(`STRUCT.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_60{sx_opt : sx?, v_typeidx : typeidx, v_fieldidx : fieldidx}: + `%`(`STRUCT.GET`_instr(sx_opt, v_typeidx, v_fieldidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_61{v_typeidx : typeidx, v_fieldidx : fieldidx}: + `%`(`STRUCT.SET`_instr(v_typeidx, v_fieldidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_fieldidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_62{var_0 : typeidx}: + `%`(`ARRAY.NEW`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_63{var_0 : typeidx}: + `%`(`ARRAY.NEW_DEFAULT`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_64{v_typeidx : typeidx, v_u32 : u32}: + `%`(`ARRAY.NEW_FIXED`_instr(v_typeidx, v_u32),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_u32) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_65{v_typeidx : typeidx, v_dataidx : dataidx}: + `%`(`ARRAY.NEW_DATA`_instr(v_typeidx, v_dataidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_66{v_typeidx : typeidx, v_elemidx : elemidx}: + `%`(`ARRAY.NEW_ELEM`_instr(v_typeidx, v_elemidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_67{sx_opt : sx?, v_typeidx : typeidx}: + `%`(`ARRAY.GET`_instr(sx_opt, v_typeidx),) + -- wf_uN: `%%`(32, v_typeidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_68{var_0 : typeidx}: + `%`(`ARRAY.SET`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_69: + `%`(`ARRAY.LEN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_70{var_0 : typeidx}: + `%`(`ARRAY.FILL`_instr(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_71{v_typeidx : typeidx, typeidx_0 : typeidx}: + `%`(`ARRAY.COPY`_instr(v_typeidx, typeidx_0),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, typeidx_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_72{v_typeidx : typeidx, v_dataidx : dataidx}: + `%`(`ARRAY.INIT_DATA`_instr(v_typeidx, v_dataidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_dataidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_73{v_typeidx : typeidx, v_elemidx : elemidx}: + `%`(`ARRAY.INIT_ELEM`_instr(v_typeidx, v_elemidx),) + -- wf_uN: `%%`(32, v_typeidx) + -- wf_uN: `%%`(32, v_elemidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_74: + `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_75: + `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_76{v_numtype : numtype, var_0 : num_}: + `%`(CONST_instr(v_numtype, var_0),) + -- wf_num_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_77{v_numtype : numtype, var_0 : unop_}: + `%`(UNOP_instr(v_numtype, var_0),) + -- wf_unop_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_78{v_numtype : numtype, var_0 : binop_}: + `%`(BINOP_instr(v_numtype, var_0),) + -- wf_binop_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_79{v_numtype : numtype, var_0 : testop_}: + `%`(TESTOP_instr(v_numtype, var_0),) + -- wf_testop_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_80{v_numtype : numtype, var_0 : relop_}: + `%`(RELOP_instr(v_numtype, var_0),) + -- wf_relop_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_81{numtype_1 : numtype, numtype_2 : numtype, var_0 : cvtop__}: + `%`(CVTOP_instr(numtype_1, numtype_2, var_0),) + -- wf_cvtop__: `%%%`(numtype_2, numtype_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_82{v_vectype : vectype, var_0 : vec_}: + `%`(VCONST_instr(v_vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_83{v_vectype : vectype, v_vvunop : vvunop}: + `%`(VVUNOP_instr(v_vectype, v_vvunop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_84{v_vectype : vectype, v_vvbinop : vvbinop}: + `%`(VVBINOP_instr(v_vectype, v_vvbinop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_85{v_vectype : vectype, v_vvternop : vvternop}: + `%`(VVTERNOP_instr(v_vectype, v_vvternop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_86{v_vectype : vectype, v_vvtestop : vvtestop}: + `%`(VVTESTOP_instr(v_vectype, v_vvtestop),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_87{v_shape : shape, var_0 : vunop_}: + `%`(VUNOP_instr(v_shape, var_0),) + -- wf_shape: `%`(v_shape,) + -- wf_vunop_: `%%`(v_shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_88{v_shape : shape, var_0 : vbinop_}: + `%`(VBINOP_instr(v_shape, var_0),) + -- wf_shape: `%`(v_shape,) + -- wf_vbinop_: `%%`(v_shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_89{v_shape : shape, var_0 : vternop_}: + `%`(VTERNOP_instr(v_shape, var_0),) + -- wf_shape: `%`(v_shape,) + -- wf_vternop_: `%%`(v_shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_90{v_shape : shape, var_0 : vtestop_}: + `%`(VTESTOP_instr(v_shape, var_0),) + -- wf_shape: `%`(v_shape,) + -- wf_vtestop_: `%%`(v_shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_91{v_shape : shape, var_0 : vrelop_}: + `%`(VRELOP_instr(v_shape, var_0),) + -- wf_shape: `%`(v_shape,) + -- wf_vrelop_: `%%`(v_shape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_92{v_ishape : ishape, var_0 : vshiftop_}: + `%`(VSHIFTOP_instr(v_ishape, var_0),) + -- wf_ishape: `%`(v_ishape,) + -- wf_vshiftop_: `%%`(v_ishape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_93{var_0 : ishape}: + `%`(VBITMASK_instr(var_0),) + -- wf_ishape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_94{v_bshape : bshape, var_0 : vswizzlop_}: + `%`(VSWIZZLOP_instr(v_bshape, var_0),) + -- wf_bshape: `%`(v_bshape,) + -- wf_vswizzlop_: `%%`(v_bshape, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_95{v_bshape : bshape, laneidx_lst : laneidx*}: + `%`(VSHUFFLE_instr(v_bshape, laneidx_lst),) + -- wf_bshape: `%`(v_bshape,) + -- (wf_uN: `%%`(8, v_laneidx))*{v_laneidx <- laneidx_lst} + -- if (`%`_dim(|laneidx_lst|,) = $fun_dim($proj_bshape_0(v_bshape).0)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_96{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextunop__}: + `%`(VEXTUNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextunop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_97{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextbinop__}: + `%`(VEXTBINOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextbinop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_98{ishape_1 : ishape, ishape_2 : ishape, var_0 : vextternop__}: + `%`(VEXTTERNOP_instr(ishape_1, ishape_2, var_0),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- wf_vextternop__: `%%%`(ishape_2, ishape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_99{ishape_1 : ishape, ishape_2 : ishape, v_sx : sx}: + `%`(VNARROW_instr(ishape_1, ishape_2, v_sx),) + -- wf_ishape: `%`(ishape_1,) + -- wf_ishape: `%`(ishape_2,) + -- if (($lsize($fun_lanetype($proj_ishape_0(ishape_2).0)) = (2 * $lsize($fun_lanetype($proj_ishape_0(ishape_1).0)))) /\ ((2 * $lsize($fun_lanetype($proj_ishape_0(ishape_1).0))) <= 32)) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_100{shape_1 : shape, shape_2 : shape, var_0 : vcvtop__}: + `%`(VCVTOP_instr(shape_1, shape_2, var_0),) + -- wf_shape: `%`(shape_1,) + -- wf_shape: `%`(shape_2,) + -- wf_vcvtop__: `%%%`(shape_2, shape_1, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_101{var_0 : shape}: + `%`(VSPLAT_instr(var_0),) + -- wf_shape: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_102{v_shape : shape, sx_opt : sx?, v_laneidx : laneidx}: + `%`(VEXTRACT_LANE_instr(v_shape, sx_opt, v_laneidx),) + -- wf_shape: `%`(v_shape,) + -- wf_uN: `%%`(8, v_laneidx) + -- if ((sx_opt =/= ?()) <=> ($fun_lanetype(v_shape) =/= $lanetype_numtype($lunpack($fun_lanetype(v_shape))))) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_103{v_shape : shape, v_laneidx : laneidx}: + `%`(VREPLACE_LANE_instr(v_shape, v_laneidx),) + -- wf_shape: `%`(v_shape,) + -- wf_uN: `%%`(8, v_laneidx) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_104{var_0 : u31}: + `%`(`REF.I31_NUM`_instr(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_105: + `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_106{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_107{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_108{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_109{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_110{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_instr(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_111{var_0 : ref}: + `%`(`REF.EXTERN`_instr(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_112{v_n : n, instr_lst : instr*, instr_lst_0 : instr*}: + `%`(`LABEL_%{%}%`_instr(v_n, instr_lst, instr_lst_0),) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- (wf_instr: `%`(instr_lst_0,))*{instr_lst_0 <- instr_lst_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_113{v_n : n, v_frame : frame, instr_lst : instr*}: + `%`(`FRAME_%{%}%`_instr(v_n, v_frame, instr_lst),) + -- wf_frame: `%`(v_frame,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_114{v_n : n, catch_lst : catch*, instr_lst : instr*}: + `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, instr_lst),) + -- (wf_catch: `%`(v_catch,))*{v_catch <- catch_lst} + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:133.8-133.13 + rule instr_case_115: + `%`(TRAP_instr,) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +syntax expr = instr* + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $memarg0 : memarg + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $memarg0 = {ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)} + -- wf_memarg: `%`({ALIGN `%`_u32(0,), OFFSET `%`_u64(0,)},) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $const(v_consttype : consttype, v_lit_ : lit_) : instr + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I32_consttype, mk_lit__0_lit_(I32_numtype, c)) = CONST_instr(I32_numtype, c) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(I64_consttype, mk_lit__0_lit_(I64_numtype, c)) = CONST_instr(I64_numtype, c) + -- wf_instr: `%`(CONST_instr(I64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F32_consttype, mk_lit__0_lit_(F32_numtype, c)) = CONST_instr(F32_numtype, c) + -- wf_instr: `%`(CONST_instr(F32_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : num_}(F64_consttype, mk_lit__0_lit_(F64_numtype, c)) = CONST_instr(F64_numtype, c) + -- wf_instr: `%`(CONST_instr(F64_numtype, c),) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $const{c : uN}(V128_consttype, mk_lit__1_lit_(V128_vectype, c)) = VCONST_instr(V128_vectype, c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_shape(v_shape : shape) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_shape{v_lanetype : lanetype, v_dim : dim}(`%X%`_shape(v_lanetype, v_dim)) = $free_lanetype(v_lanetype) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_blocktype(v_blocktype : blocktype) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{valtype_opt : valtype?}(_RESULT_blocktype(valtype_opt)) = $free_opt($free_valtype(v_valtype)?{v_valtype <- valtype_opt}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_blocktype{v_typeidx : uN}(_IDX_blocktype(v_typeidx)) = $free_typeidx(v_typeidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_catch(v_catch : catch) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{v_tagidx : uN, v_labelidx : uN}(CATCH_catch(v_tagidx, v_labelidx)) = $free_tagidx(v_tagidx) +++ $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{v_tagidx : uN, v_labelidx : uN}(CATCH_REF_catch(v_tagidx, v_labelidx)) = $free_tagidx(v_tagidx) +++ $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{v_labelidx : uN}(CATCH_ALL_catch(v_labelidx)) = $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_catch{v_labelidx : uN}(CATCH_ALL_REF_catch(v_labelidx)) = $free_labelidx(v_labelidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:585.1-585.44 +def $shift_labelidxs(var_0 : labelidx*) : labelidx* + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:586.1-586.32 + def $shift_labelidxs([]) = [] + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:587.1-587.66 + def $shift_labelidxs{labelidx'_lst : labelidx*}([`%`_labelidx(0,)] ++ labelidx'_lst) = $shift_labelidxs(labelidx'_lst) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:588.1-588.91 + def $shift_labelidxs{v_labelidx : uN, labelidx'_lst : labelidx*}([v_labelidx] ++ labelidx'_lst) = [`%`_labelidx(((($proj_uN_0(v_labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'_lst) + -- wf_uN: `%%`(32, `%`_uN(((($proj_uN_0(v_labelidx).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:421.1-421.30 +def $free_instr(v_instr : instr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:436.1-436.26 + def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:437.1-437.34 + def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:438.1-438.27 + def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:439.1-439.86 + def $free_instr{valtype_lst_opt : valtype*?}(SELECT_instr(valtype_lst_opt)) = $free_opt($free_list($free_valtype(v_valtype)*{v_valtype <- valtype_lst})?{valtype_lst <- valtype_lst_opt}) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:441.1-441.92 + def $free_instr{v_blocktype : blocktype, instr_lst : instr*}(BLOCK_instr(v_blocktype, instr_lst)) = $free_blocktype(v_blocktype) +++ $free_block(instr_lst) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:442.1-442.91 + def $free_instr{v_blocktype : blocktype, instr_lst : instr*}(LOOP_instr(v_blocktype, instr_lst)) = $free_blocktype(v_blocktype) +++ $free_block(instr_lst) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:443.1-444.79 + def $free_instr{v_blocktype : blocktype, instr_1_lst : instr*, instr_2_lst : instr*}(`IF%%ELSE%`_instr(v_blocktype, instr_1_lst, instr_2_lst)) = $free_blocktype(v_blocktype) +++ $free_block(instr_1_lst) +++ $free_block(instr_2_lst) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:446.1-446.56 + def $free_instr{v_labelidx : uN}(BR_instr(v_labelidx)) = $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:447.1-447.59 + def $free_instr{v_labelidx : uN}(BR_IF_instr(v_labelidx)) = $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:448.1-449.69 + def $free_instr{labelidx_lst : labelidx*, labelidx' : uN}(BR_TABLE_instr(labelidx_lst, labelidx')) = $free_list($free_labelidx(v_labelidx)*{v_labelidx <- labelidx_lst}) +++ $free_labelidx(labelidx') + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:450.1-450.64 + def $free_instr{v_labelidx : uN}(BR_ON_NULL_instr(v_labelidx)) = $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:451.1-451.68 + def $free_instr{v_labelidx : uN}(BR_ON_NON_NULL_instr(v_labelidx)) = $free_labelidx(v_labelidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:452.1-453.83 + def $free_instr{v_labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(v_labelidx, reftype_1, reftype_2)) = $free_labelidx(v_labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{v_labelidx : uN, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(v_labelidx, reftype_1, reftype_2)) = $free_labelidx(v_labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:457.1-457.55 + def $free_instr{v_funcidx : uN}(CALL_instr(v_funcidx)) = $free_funcidx(v_funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:458.1-458.59 + def $free_instr{v_typeuse : typeuse}(CALL_REF_instr(v_typeuse)) = $free_typeuse(v_typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:459.1-460.53 + def $free_instr{v_tableidx : uN, v_typeuse : typeuse}(CALL_INDIRECT_instr(v_tableidx, v_typeuse)) = $free_tableidx(v_tableidx) +++ $free_typeuse(v_typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:461.1-461.29 + def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:462.1-462.62 + def $free_instr{v_funcidx : uN}(RETURN_CALL_instr(v_funcidx)) = $free_funcidx(v_funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:463.1-463.66 + def $free_instr{v_typeuse : typeuse}(RETURN_CALL_REF_instr(v_typeuse)) = $free_typeuse(v_typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:464.1-465.53 + def $free_instr{v_tableidx : uN, v_typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(v_tableidx, v_typeuse)) = $free_tableidx(v_tableidx) +++ $free_typeuse(v_typeuse) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:467.1-467.53 + def $free_instr{v_tagidx : uN}(THROW_instr(v_tagidx)) = $free_tagidx(v_tagidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:468.1-468.32 + def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:469.1-470.87 + def $free_instr{v_blocktype : blocktype, catch_lst : catch*, instr_lst : instr*}(TRY_TABLE_instr(v_blocktype, `%`_list(catch_lst,), instr_lst)) = $free_blocktype(v_blocktype) +++ $free_list($free_catch(v_catch)*{v_catch <- catch_lst}) +++ $free_block(instr_lst) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:472.1-472.63 + def $free_instr{v_numtype : numtype, numlit : num_}(CONST_instr(v_numtype, numlit)) = $free_numtype(v_numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:473.1-473.60 + def $free_instr{v_numtype : numtype, unop : unop_}(UNOP_instr(v_numtype, unop)) = $free_numtype(v_numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:474.1-474.62 + def $free_instr{v_numtype : numtype, binop : binop_}(BINOP_instr(v_numtype, binop)) = $free_numtype(v_numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:475.1-475.64 + def $free_instr{v_numtype : numtype, testop : testop_}(TESTOP_instr(v_numtype, testop)) = $free_numtype(v_numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:476.1-476.62 + def $free_instr{v_numtype : numtype, relop : relop_}(RELOP_instr(v_numtype, relop)) = $free_numtype(v_numtype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:477.1-478.55 + def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:480.1-480.64 + def $free_instr{v_vectype : vectype, veclit : uN}(VCONST_instr(v_vectype, veclit)) = $free_vectype(v_vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{v_vectype : vectype, v_vvunop : vvunop}(VVUNOP_instr(v_vectype, v_vvunop)) = $free_vectype(v_vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:482.1-482.66 + def $free_instr{v_vectype : vectype, v_vvbinop : vvbinop}(VVBINOP_instr(v_vectype, v_vvbinop)) = $free_vectype(v_vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:483.1-483.68 + def $free_instr{v_vectype : vectype, v_vvternop : vvternop}(VVTERNOP_instr(v_vectype, v_vvternop)) = $free_vectype(v_vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:484.1-484.68 + def $free_instr{v_vectype : vectype, v_vvtestop : vvtestop}(VVTESTOP_instr(v_vectype, v_vvtestop)) = $free_vectype(v_vectype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:485.1-485.56 + def $free_instr{v_shape : shape, vunop : vunop_}(VUNOP_instr(v_shape, vunop)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:486.1-486.58 + def $free_instr{v_shape : shape, vbinop : vbinop_}(VBINOP_instr(v_shape, vbinop)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:487.1-487.60 + def $free_instr{v_shape : shape, vternop : vternop_}(VTERNOP_instr(v_shape, vternop)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:488.1-488.60 + def $free_instr{v_shape : shape, vtestop : vtestop_}(VTESTOP_instr(v_shape, vtestop)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:489.1-489.58 + def $free_instr{v_shape : shape, vrelop : vrelop_}(VRELOP_instr(v_shape, vrelop)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:490.1-490.64 + def $free_instr{v_ishape : ishape, vshiftop : vshiftop_}(VSHIFTOP_instr(v_ishape, vshiftop)) = $free_shape($proj_ishape_0(v_ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:491.1-491.55 + def $free_instr{v_ishape : ishape}(VBITMASK_instr(v_ishape)) = $free_shape($proj_ishape_0(v_ishape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:492.1-492.66 + def $free_instr{v_bshape : bshape, vswizzlop : vswizzlop_}(VSWIZZLOP_instr(v_bshape, vswizzlop)) = $free_shape($proj_bshape_0(v_bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:493.1-493.64 + def $free_instr{v_bshape : bshape, laneidx_lst : laneidx*}(VSHUFFLE_instr(v_bshape, laneidx_lst)) = $free_shape($proj_bshape_0(v_bshape).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:494.1-495.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:496.1-497.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:498.1-499.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:500.1-501.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, v_sx : sx}(VNARROW_instr(ishape_1, ishape_2, v_sx)) = $free_shape($proj_ishape_0(ishape_1).0) +++ $free_shape($proj_ishape_0(ishape_2).0) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:502.1-503.47 + def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:504.1-504.51 + def $free_instr{v_shape : shape}(VSPLAT_instr(v_shape)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:505.1-505.70 + def $free_instr{v_shape : shape, sx_opt : sx?, v_laneidx : uN}(VEXTRACT_LANE_instr(v_shape, sx_opt, v_laneidx)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:506.1-506.66 + def $free_instr{v_shape : shape, v_laneidx : uN}(VREPLACE_LANE_instr(v_shape, v_laneidx)) = $free_shape(v_shape) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:508.1-508.62 + def $free_instr{v_heaptype : heaptype}(`REF.NULL`_instr(v_heaptype)) = $free_heaptype(v_heaptype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:509.1-509.34 + def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:510.1-510.38 + def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:511.1-511.29 + def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:512.1-512.59 + def $free_instr{v_reftype : reftype}(`REF.TEST`_instr(v_reftype)) = $free_reftype(v_reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:513.1-513.59 + def $free_instr{v_reftype : reftype}(`REF.CAST`_instr(v_reftype)) = $free_reftype(v_reftype) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:514.1-514.59 + def $free_instr{v_funcidx : uN}(`REF.FUNC`_instr(v_funcidx)) = $free_funcidx(v_funcidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:515.1-515.30 + def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:517.1-517.33 + def $free_instr{v_sx : sx}(`I31.GET`_instr(v_sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:519.1-519.61 + def $free_instr{v_typeidx : uN}(`STRUCT.NEW`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:520.1-520.69 + def $free_instr{v_typeidx : uN}(`STRUCT.NEW_DEFAULT`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:521.1-521.69 + def $free_instr{sx_opt : sx?, v_typeidx : uN, v_u32 : uN}(`STRUCT.GET`_instr(sx_opt, v_typeidx, v_u32)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:522.1-522.65 + def $free_instr{v_typeidx : uN, v_u32 : uN}(`STRUCT.SET`_instr(v_typeidx, v_u32)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:524.1-524.60 + def $free_instr{v_typeidx : uN}(`ARRAY.NEW`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:525.1-525.68 + def $free_instr{v_typeidx : uN}(`ARRAY.NEW_DEFAULT`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:526.1-526.70 + def $free_instr{v_typeidx : uN, v_u32 : uN}(`ARRAY.NEW_FIXED`_instr(v_typeidx, v_u32)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:527.1-528.51 + def $free_instr{v_typeidx : uN, v_dataidx : uN}(`ARRAY.NEW_DATA`_instr(v_typeidx, v_dataidx)) = $free_typeidx(v_typeidx) +++ $free_dataidx(v_dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:529.1-530.51 + def $free_instr{v_typeidx : uN, v_elemidx : uN}(`ARRAY.NEW_ELEM`_instr(v_typeidx, v_elemidx)) = $free_typeidx(v_typeidx) +++ $free_elemidx(v_elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:531.1-531.64 + def $free_instr{sx_opt : sx?, v_typeidx : uN}(`ARRAY.GET`_instr(sx_opt, v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:532.1-532.60 + def $free_instr{v_typeidx : uN}(`ARRAY.SET`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:533.1-533.32 + def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:534.1-534.61 + def $free_instr{v_typeidx : uN}(`ARRAY.FILL`_instr(v_typeidx)) = $free_typeidx(v_typeidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:535.1-536.55 + def $free_instr{typeidx_1 : uN, typeidx_2 : uN}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:537.1-538.51 + def $free_instr{v_typeidx : uN, v_dataidx : uN}(`ARRAY.INIT_DATA`_instr(v_typeidx, v_dataidx)) = $free_typeidx(v_typeidx) +++ $free_dataidx(v_dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:539.1-540.51 + def $free_instr{v_typeidx : uN, v_elemidx : uN}(`ARRAY.INIT_ELEM`_instr(v_typeidx, v_elemidx)) = $free_typeidx(v_typeidx) +++ $free_elemidx(v_elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:542.1-542.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:543.1-543.41 + def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:545.1-545.63 + def $free_instr{v_localidx : uN}(`LOCAL.GET`_instr(v_localidx)) = $free_localidx(v_localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:546.1-546.63 + def $free_instr{v_localidx : uN}(`LOCAL.SET`_instr(v_localidx)) = $free_localidx(v_localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:547.1-547.63 + def $free_instr{v_localidx : uN}(`LOCAL.TEE`_instr(v_localidx)) = $free_localidx(v_localidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:549.1-549.67 + def $free_instr{v_globalidx : uN}(`GLOBAL.GET`_instr(v_globalidx)) = $free_globalidx(v_globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:550.1-550.67 + def $free_instr{v_globalidx : uN}(`GLOBAL.SET`_instr(v_globalidx)) = $free_globalidx(v_globalidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{v_tableidx : uN}(`TABLE.GET`_instr(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{v_tableidx : uN}(`TABLE.SET`_instr(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:554.1-554.64 + def $free_instr{v_tableidx : uN}(`TABLE.SIZE`_instr(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:555.1-555.64 + def $free_instr{v_tableidx : uN}(`TABLE.GROW`_instr(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:556.1-556.64 + def $free_instr{v_tableidx : uN}(`TABLE.FILL`_instr(v_tableidx)) = $free_tableidx(v_tableidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:557.1-558.59 + def $free_instr{tableidx_1 : uN, tableidx_2 : uN}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:559.1-560.53 + def $free_instr{v_tableidx : uN, v_elemidx : uN}(`TABLE.INIT`_instr(v_tableidx, v_elemidx)) = $free_tableidx(v_tableidx) +++ $free_elemidx(v_elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:561.1-561.60 + def $free_instr{v_elemidx : uN}(`ELEM.DROP`_instr(v_elemidx)) = $free_elemidx(v_elemidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:563.1-564.49 + def $free_instr{v_numtype : numtype, loadop_opt : loadop_?, v_memidx : uN, v_memarg : memarg}(LOAD_instr(v_numtype, loadop_opt, v_memidx, v_memarg)) = $free_numtype(v_numtype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:565.1-566.49 + def $free_instr{v_numtype : numtype, storeop_opt : storeop_?, v_memidx : uN, v_memarg : memarg}(STORE_instr(v_numtype, storeop_opt, v_memidx, v_memarg)) = $free_numtype(v_numtype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:567.1-568.49 + def $free_instr{v_vectype : vectype, vloadop_opt : vloadop_?, v_memidx : uN, v_memarg : memarg}(VLOAD_instr(v_vectype, vloadop_opt, v_memidx, v_memarg)) = $free_vectype(v_vectype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:569.1-570.49 + def $free_instr{v_vectype : vectype, v_sz : sz, v_memidx : uN, v_memarg : memarg, v_laneidx : uN}(VLOAD_LANE_instr(v_vectype, v_sz, v_memidx, v_memarg, v_laneidx)) = $free_vectype(v_vectype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:571.1-572.49 + def $free_instr{v_vectype : vectype, v_memidx : uN, v_memarg : memarg}(VSTORE_instr(v_vectype, v_memidx, v_memarg)) = $free_vectype(v_vectype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:573.1-574.49 + def $free_instr{v_vectype : vectype, v_sz : sz, v_memidx : uN, v_memarg : memarg, v_laneidx : uN}(VSTORE_LANE_instr(v_vectype, v_sz, v_memidx, v_memarg, v_laneidx)) = $free_vectype(v_vectype) +++ $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:575.1-575.59 + def $free_instr{v_memidx : uN}(`MEMORY.SIZE`_instr(v_memidx)) = $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:576.1-576.59 + def $free_instr{v_memidx : uN}(`MEMORY.GROW`_instr(v_memidx)) = $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:577.1-577.59 + def $free_instr{v_memidx : uN}(`MEMORY.FILL`_instr(v_memidx)) = $free_memidx(v_memidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:578.1-579.51 + def $free_instr{memidx_1 : uN, memidx_2 : uN}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:580.1-581.49 + def $free_instr{v_memidx : uN, v_dataidx : uN}(`MEMORY.INIT`_instr(v_memidx, v_dataidx)) = $free_memidx(v_memidx) +++ $free_dataidx(v_dataidx) + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:582.1-582.60 + def $free_instr{v_dataidx : uN}(`DATA.DROP`_instr(v_dataidx)) = $free_dataidx(v_dataidx) + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:422.1-422.31 +def $free_block(var_0 : instr*) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec:590.1-591.47 + def $free_block{instr_lst : instr*}(instr_lst) = v_free[LABELS_free = $shift_labelidxs(v_free.LABELS_free)] + -- let{v_free : free} v_free = $free_list($free_instr(instr#6)*{instr#6 <- instr_lst}) +} + +;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec +def $free_expr(v_expr : expr) : free + ;; ../../../../specification/wasm-3.0/1.3-syntax.instructions.spectec + def $free_expr{instr_lst : instr*}(instr_lst) = $free_list($free_instr(v_instr)*{v_instr <- instr_lst}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elemmode = + | ACTIVE(v_tableidx : tableidx, v_expr : expr) + | PASSIVE + | DECLARE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elemmode: `%`(elemmode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_0{v_tableidx : tableidx, v_expr : expr}: + `%`(ACTIVE_elemmode(v_tableidx, v_expr),) + -- wf_uN: `%%`(32, v_tableidx) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_1: + `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elemmode_case_2: + `%`(DECLARE_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax datamode = + | ACTIVE(v_memidx : memidx, v_expr : expr) + | PASSIVE + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_datamode: `%`(datamode,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_0{v_memidx : memidx, v_expr : expr}: + `%`(ACTIVE_datamode(v_memidx, v_expr),) + -- wf_uN: `%%`(32, v_memidx) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule datamode_case_1: + `%`(PASSIVE_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax type = + | TYPE(rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax tag = + | TAG(tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_tag: `%`(tag,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule tag_case_0{var_0 : tagtype}: + `%`(TAG_tag(var_0),) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax global = + | GLOBAL(v_globaltype : globaltype, v_expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_global: `%`(global,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule global_case_0{v_globaltype : globaltype, v_expr : expr}: + `%`(GLOBAL_global(v_globaltype, v_expr),) + -- wf_globaltype: `%`(v_globaltype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax mem = + | MEMORY(memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_mem: `%`(mem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule mem_case_0{var_0 : memtype}: + `%`(MEMORY_mem(var_0),) + -- wf_memtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax table = + | TABLE(v_tabletype : tabletype, v_expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_table: `%`(table,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule table_case_0{v_tabletype : tabletype, v_expr : expr}: + `%`(TABLE_table(v_tabletype, v_expr),) + -- wf_tabletype: `%`(v_tabletype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax data = + | DATA(byte_lst : byte*, v_datamode : datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_data: `%`(data,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule data_case_0{byte_lst : byte*, v_datamode : datamode}: + `%`(DATA_data(byte_lst, v_datamode),) + -- (wf_byte: `%`(v_byte,))*{v_byte <- byte_lst} + -- wf_datamode: `%`(v_datamode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax local = + | LOCAL(valtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_local: `%`(local,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule local_case_0{var_0 : valtype}: + `%`(LOCAL_local(var_0),) + -- wf_valtype: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax func = + | FUNC(v_typeidx : typeidx, local_lst : local*, v_expr : expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_func: `%`(func,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule func_case_0{v_typeidx : typeidx, local_lst : local*, v_expr : expr}: + `%`(FUNC_func(v_typeidx, local_lst, v_expr),) + -- wf_uN: `%%`(32, v_typeidx) + -- (wf_local: `%`(v_local,))*{v_local <- local_lst} + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax elem = + | ELEM(v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_elem: `%`(elem,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule elem_case_0{v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode}: + `%`(ELEM_elem(v_reftype, expr_lst, v_elemmode),) + -- wf_reftype: `%`(v_reftype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr}*{v_expr <- expr_lst} + -- wf_elemmode: `%`(v_elemmode,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax start = + | START(funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_start: `%`(start,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule start_case_0{var_0 : funcidx}: + `%`(START_start(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax import = + | IMPORT(v_name : name, v_name : name, v_externtype : externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_import: `%`(import,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule import_case_0{v_name : name, name_0 : name, v_externtype : externtype}: + `%`(IMPORT_import(v_name, name_0, v_externtype),) + -- wf_name: `%`(v_name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(v_externtype,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax export = + | EXPORT(v_name : name, v_externidx : externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_export: `%`(export,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule export_case_0{v_name : name, v_externidx : externidx}: + `%`(EXPORT_export(v_name, v_externidx),) + -- wf_name: `%`(v_name,) + -- wf_externidx: `%`(v_externidx,) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +syntax module = + | MODULE(list(syntax type), list(syntax import), list(syntax tag), list(syntax global), list(syntax mem), list(syntax table), list(syntax func), list(syntax data), list(syntax elem), start_opt : start?, list(syntax export)) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +relation wf_module: `%`(module,) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + rule module_case_0{var_0 : list(syntax type), var_1 : list(syntax import), var_2 : list(syntax tag), var_3 : list(syntax global), var_4 : list(syntax mem), var_5 : list(syntax table), var_6 : list(syntax func), var_7 : list(syntax data), var_8 : list(syntax elem), start_opt : start?, var_9 : list(syntax export)}: + `%`(MODULE_module(var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7, var_8, start_opt, var_9),) + -- (wf_start: `%`(v_start,))?{v_start <- start_opt} + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_type(v_type : type) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_type{v_rectype : rectype}(TYPE_type(v_rectype)) = $free_rectype(v_rectype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_tag(v_tag : tag) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_tag{v_tagtype : typeuse}(TAG_tag(v_tagtype)) = $free_tagtype(v_tagtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_global(v_global : global) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_global{v_globaltype : globaltype, v_expr : instr*}(GLOBAL_global(v_globaltype, v_expr)) = $free_globaltype(v_globaltype) +++ $free_expr(v_expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_mem(v_mem : mem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_mem{v_memtype : memtype}(MEMORY_mem(v_memtype)) = $free_memtype(v_memtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_table(v_table : table) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_table{v_tabletype : tabletype, v_expr : instr*}(TABLE_table(v_tabletype, v_expr)) = $free_tabletype(v_tabletype) +++ $free_expr(v_expr) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_local(v_local : local) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_local{t : valtype}(LOCAL_local(t)) = $free_valtype(t) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_func(v_func : func) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_func{v_typeidx : uN, local_lst : local*, v_expr : instr*}(FUNC_func(v_typeidx, local_lst, v_expr)) = $free_typeidx(v_typeidx) +++ $free_list($free_local(v_local)*{v_local <- local_lst}) +++ $free_block(v_expr)[LOCALS_free = []] + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_datamode(v_datamode : datamode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode{v_memidx : uN, v_expr : instr*}(ACTIVE_datamode(v_memidx, v_expr)) = $free_memidx(v_memidx) +++ $free_expr(v_expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_datamode(PASSIVE_datamode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_data(v_data : data) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_data{byte_lst : byte*, v_datamode : datamode}(DATA_data(byte_lst, v_datamode)) = $free_datamode(v_datamode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elemmode(v_elemmode : elemmode) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode{v_tableidx : uN, v_expr : instr*}(ACTIVE_elemmode(v_tableidx, v_expr)) = $free_tableidx(v_tableidx) +++ $free_expr(v_expr) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(PASSIVE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elemmode(DECLARE_elemmode) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + -- wf_free: `%`({TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []},) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_elem(v_elem : elem) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_elem{v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode}(ELEM_elem(v_reftype, expr_lst, v_elemmode)) = $free_reftype(v_reftype) +++ $free_list($free_expr(v_expr)*{v_expr <- expr_lst}) +++ $free_elemmode(v_elemmode) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_start(v_start : start) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_start{v_funcidx : uN}(START_start(v_funcidx)) = $free_funcidx(v_funcidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_import(v_import : import) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_import{name_1 : name, name_2 : name, v_externtype : externtype}(IMPORT_import(name_1, name_2, v_externtype)) = $free_externtype(v_externtype) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_export(v_export : export) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_export{v_name : name, v_externidx : externidx}(EXPORT_export(v_name, v_externidx)) = $free_externidx(v_externidx) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $free_module(v_module : module) : free + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $free_module{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*}(MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,))) = $free_list($free_type(v_type)*{v_type <- type_lst}) +++ $free_list($free_tag(v_tag)*{v_tag <- tag_lst}) +++ $free_list($free_global(v_global)*{v_global <- global_lst}) +++ $free_list($free_mem(v_mem)*{v_mem <- mem_lst}) +++ $free_list($free_table(v_table)*{v_table <- table_lst}) +++ $free_list($free_func(v_func)*{v_func <- func_lst}) +++ $free_list($free_data(v_data)*{v_data <- data_lst}) +++ $free_list($free_elem(v_elem)*{v_elem <- elem_lst}) +++ $free_opt($free_start(v_start)?{v_start <- start_opt}) +++ $free_list($free_import(v_import)*{v_import <- import_lst}) +++ $free_list($free_export(v_export)*{v_export <- export_lst}) + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $funcidx_module(v_module : module) : funcidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $funcidx_module{v_module : module}(v_module) = $free_module(v_module).FUNCS_free + +;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec +def $dataidx_funcs(var_0 : func*) : dataidx* + ;; ../../../../specification/wasm-3.0/1.4-syntax.modules.spectec + def $dataidx_funcs{func_lst : func*}(func_lst) = $free_list($free_func(v_func)*{v_func <- func_lst}).DATAS_free + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax init = + | SET + | UNSET + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax localtype = + | `%%`(v_init : init, v_valtype : valtype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_localtype: `%`(localtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule localtype_case_0{v_init : init, v_valtype : valtype}: + `%`(`%%`_localtype(v_init, v_valtype),) + -- wf_valtype: `%`(v_valtype,) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax instrtype = + | `%->_%%`(v_resulttype : resulttype, localidx_lst : localidx*, v_resulttype : resulttype) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_instrtype: `%`(instrtype,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule instrtype_case_0{v_resulttype : resulttype, localidx_lst : localidx*, resulttype_0 : resulttype}: + `%`(`%->_%%`_instrtype(v_resulttype, localidx_lst, resulttype_0),) + -- (wf_uN: `%%`(32, v_localidx))*{v_localidx <- localidx_lst} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +syntax context = +{ + TYPES deftype*, + TAGS tagtype*, + GLOBALS globaltype*, + MEMS memtype*, + TABLES tabletype*, + FUNCS deftype*, + DATAS datatype*, + ELEMS elemtype*, + LOCALS localtype*, + LABELS resulttype*, + RETURN resulttype?, + REFS funcidx*, + RECS subtype* +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +relation wf_context: `%`(context,) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + rule context_case_{var_0 : deftype*, var_1 : tagtype*, var_2 : globaltype*, var_3 : memtype*, var_4 : tabletype*, var_5 : deftype*, var_6 : datatype*, var_7 : elemtype*, var_8 : localtype*, var_9 : resulttype*, var_10 : resulttype?, var_11 : funcidx*, var_12 : subtype*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, RETURN var_10, REFS var_11, RECS var_12},) + -- (wf_typeuse: `%`(var_1,))*{var_1 <- var_1} + -- (wf_globaltype: `%`(var_2,))*{var_2 <- var_2} + -- (wf_memtype: `%`(var_3,))*{var_3 <- var_3} + -- (wf_tabletype: `%`(var_4,))*{var_4 <- var_4} + -- (wf_reftype: `%`(var_7,))*{var_7 <- var_7} + -- (wf_localtype: `%`(var_8,))*{var_8 <- var_8} + -- (wf_uN: `%%`(32, var_11))*{var_11 <- var_11} + -- (wf_subtype: `%`(var_12,))*{var_12 <- var_12} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:49.1-49.158 +def $with_locals(v_context : context, var_0 : localidx*, var_1 : localtype*) : context? + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:51.1-51.34 + def $with_locals{C : context}(C, [], []) = ?(C) + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:52.1-52.90 + def $with_locals{C : context, x_1 : uN, x_lst : idx*, lct_1 : localtype, lct_lst : localtype*}(C, [x_1] ++ x_lst, [lct_1] ++ lct_lst) = $with_locals(C[LOCALS_context[$proj_uN_0(x_1).0] = lct_1], x_lst, lct_lst) + def $with_locals{x0 : context, x1 : localidx*, x2 : localtype*}(x0, x1, x2) = ?() + -- otherwise +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:62.1-62.94 +def $clos_deftypes(var_0 : deftype*) : deftype* + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:71.1-71.30 + def $clos_deftypes([]) = [] + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec:72.1-72.101 + def $clos_deftypes{dt_lst : deftype*, dt_n : deftype}(dt_lst ++ [dt_n]) = dt'_lst ++ [$subst_all_deftype(dt_n, $typeuse_deftype(dt')*{dt' <- dt'_lst})] + -- let{dt'_lst : deftype*} dt'_lst = $clos_deftypes(dt_lst) +} + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_valtype(v_context : context, v_valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_valtype{C : context, t : valtype}(C, t) = $subst_all_valtype(t, $typeuse_deftype(dt)*{dt <- dt_lst}) + -- let{dt_lst : deftype*} dt_lst = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_deftype(v_context : context, v_deftype : deftype) : deftype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_deftype{C : context, dt : deftype}(C, dt) = $subst_all_deftype(dt, $typeuse_deftype(dt')*{dt' <- dt'_lst}) + -- let{dt'_lst : deftype*} dt'_lst = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_tagtype(v_context : context, v_tagtype : tagtype) : tagtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_tagtype{C : context, jt : typeuse}(C, jt) = $subst_all_tagtype(jt, $typeuse_deftype(dt)*{dt <- dt_lst}) + -- let{dt_lst : deftype*} dt_lst = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_externtype(v_context : context, v_externtype : externtype) : externtype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_externtype{C : context, xt : externtype}(C, xt) = $subst_all_externtype(xt, $typeuse_deftype(dt)*{dt <- dt_lst}) + -- let{dt_lst : deftype*} dt_lst = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec +def $clos_moduletype(v_context : context, v_moduletype : moduletype) : moduletype + ;; ../../../../specification/wasm-3.0/2.0-validation.contexts.spectec + def $clos_moduletype{C : context, mmt : moduletype}(C, mmt) = $subst_all_moduletype(mmt, $typeuse_deftype(dt)*{dt <- dt_lst}) + -- let{dt_lst : deftype*} dt_lst = $clos_deftypes(C.TYPES_context) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Numtype_ok: `%|-%:OK`(context, numtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Numtype_ok{C : context, v_numtype : numtype}: + `%|-%:OK`(C, v_numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Vectype_ok: `%|-%:OK`(context, vectype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Vectype_ok{C : context, v_vectype : vectype}: + `%|-%:OK`(C, v_vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypenat = + | OK(nat) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Packtype_ok: `%|-%:OK`(context, packtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Packtype_ok{C : context, v_packtype : packtype}: + `%|-%:OK`(C, v_packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Packtype_sub: `%|-%<:%`(context, packtype, packtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Packtype_sub{C : context, v_packtype : packtype}: + `%|-%<:%`(C, v_packtype, v_packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Numtype_sub: `%|-%<:%`(context, numtype, numtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Numtype_sub{C : context, v_numtype : numtype}: + `%|-%<:%`(C, v_numtype, v_numtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand: `%~~%`(deftype, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Expand{v_deftype : deftype, v_comptype : comptype, final_opt : final?, typeuse_lst : typeuse*}: + `%~~%`(v_deftype, v_comptype) + -- if ($unrolldt(v_deftype) = SUB_subtype(final_opt, typeuse_lst, v_comptype)) + -- wf_subtype: `%`(SUB_subtype(final_opt, typeuse_lst, v_comptype),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Vectype_sub: `%|-%<:%`(context, vectype, vectype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Vectype_sub{C : context, v_vectype : vectype}: + `%|-%<:%`(C, v_vectype, v_vectype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $before(v_typeuse : typeuse, nat : nat) : bool + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{j : nat, i : nat}(REC_typeuse(j), i) = (j < i) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $before{v_typeuse : typeuse, i : nat}(v_typeuse, i) = true + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +def $unrollht_(v_context : context, v_heaptype : heaptype) : subtype + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{v_rectype : rectype, v_n : n, C : context}(C, _DEF_heaptype(v_rectype, v_n)) = $unrolldt(_DEF_deftype(v_rectype, v_n)) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, v_typeidx : uN}(C, _IDX_heaptype(v_typeidx)) = $unrolldt(C.TYPES_context[$proj_uN_0(v_typeidx).0]) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + def $unrollht_{C : context, i : nat}(C, REC_heaptype(i)) = C.RECS_context[i] + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:9.1-9.92 +relation Heaptype_ok: `%|-%:OK`(context, heaptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:20.1-21.24 + rule abs{C : context, v_absheaptype : absheaptype}: + `%|-%:OK`(C, $heaptype_absheaptype(v_absheaptype)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:23.1-25.35 + rule typeuse{C : context, v_typeuse : typeuse}: + `%|-%:OK`(C, $heaptype_typeuse(v_typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, v_typeuse) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(v_typeuse,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:27.1-28.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:10.1-10.91 +relation Reftype_ok: `%|-%:OK`(context, reftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:30.1-32.37 + rule mk_Reftype_ok{C : context, v_heaptype : heaptype}: + `%|-%:OK`(C, REF_reftype(?(NULL_null), v_heaptype)) + -- Heaptype_ok: `%|-%:OK`(C, v_heaptype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), v_heaptype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:11.1-11.91 +relation Valtype_ok: `%|-%:OK`(context, valtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:34.1-36.35 + rule num{C : context, v_numtype : numtype}: + `%|-%:OK`(C, $valtype_numtype(v_numtype)) + -- Numtype_ok: `%|-%:OK`(C, v_numtype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:38.1-40.35 + rule vec{C : context, v_vectype : vectype}: + `%|-%:OK`(C, $valtype_vectype(v_vectype)) + -- Vectype_ok: `%|-%:OK`(C, v_vectype) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:42.1-44.35 + rule ref{C : context, v_reftype : reftype}: + `%|-%:OK`(C, $valtype_reftype(v_reftype)) + -- Reftype_ok: `%|-%:OK`(C, v_reftype) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(v_reftype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:46.1-47.16 + rule bot{C : context}: + `%|-%:OK`(C, BOT_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:12.1-12.94 +relation Typeuse_ok: `%|-%:OK`(context, typeuse) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:106.1-108.30 + rule typeidx{C : context, v_typeidx : typeidx, dt : deftype}: + `%|-%:OK`(C, _IDX_typeuse(v_typeidx)) + -- if ($proj_uN_0(v_typeidx).0 < |C.TYPES_context|) + -- if (C.TYPES_context[$proj_uN_0(v_typeidx).0] = dt) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(_IDX_typeuse(v_typeidx),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:110.1-112.23 + rule rec{C : context, i : n, st : subtype}: + `%|-%:OK`(C, REC_typeuse(i)) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = st) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(st,) + -- wf_typeuse: `%`(REC_typeuse(i),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:114.1-116.35 + rule deftype{C : context, v_deftype : deftype}: + `%|-%:OK`(C, $typeuse_deftype(v_deftype)) + -- Deftype_ok: `%|-%:OK`(C, v_deftype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:53.1-53.100 +relation Resulttype_ok: `%|-%:OK`(context, resulttype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:60.1-62.32 + rule mk_Resulttype_ok{C : context, t_lst : valtype*}: + `%|-%:OK`(C, `%`_resulttype(t_lst,)) + -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- t_lst} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t,))*{t <- t_lst} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:92.1-92.104 +relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:130.1-132.43 + rule mk_Fieldtype_ok{C : context, v_storagetype : storagetype}: + `%|-%:OK`(C, `%%`_fieldtype(?(MUT_mut), v_storagetype)) + -- Storagetype_ok: `%|-%:OK`(C, v_storagetype) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), v_storagetype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:93.1-93.106 +relation Storagetype_ok: `%|-%:OK`(context, storagetype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:122.1-124.35 + rule val{C : context, v_valtype : valtype}: + `%|-%:OK`(C, $storagetype_valtype(v_valtype)) + -- Valtype_ok: `%|-%:OK`(C, v_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(v_valtype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:126.1-128.37 + rule pack{C : context, v_packtype : packtype}: + `%|-%:OK`(C, $storagetype_packtype(v_packtype)) + -- Packtype_ok: `%|-%:OK`(C, v_packtype) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:94.1-94.103 +relation Comptype_ok: `%|-%:OK`(context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:135.1-137.42 + rule struct{C : context, fieldtype_lst : fieldtype*}: + `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype_lst,))) + -- (Fieldtype_ok: `%|-%:OK`(C, v_fieldtype))*{v_fieldtype <- fieldtype_lst} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:139.1-141.39 + rule array{C : context, v_fieldtype : fieldtype}: + `%|-%:OK`(C, ARRAY_comptype(v_fieldtype)) + -- Fieldtype_ok: `%|-%:OK`(C, v_fieldtype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(v_fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:143.1-146.35 + rule func{C : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1_lst,)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2_lst,)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:97.1-97.126 +relation Subtype_ok2: `%|-%:%`(context, subtype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:167.1-176.49 + rule mk_Subtype_ok2{C : context, typeuse_lst : typeuse*, v_comptype : comptype, i : nat, comptype'_lst : comptype*, typeuse'_lst_lst : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), typeuse_lst, v_comptype), OK_oktypenat(i)) + -- if (|typeuse_lst| <= 1) + -- (Typeuse_ok: `%|-%:OK`(C, v_typeuse))*{v_typeuse <- typeuse_lst} + -- (if $before(v_typeuse, i))*{v_typeuse <- typeuse_lst} + -- if (|comptype'_lst| = |typeuse_lst|) + -- if (|comptype'_lst| = |typeuse'_lst_lst|) + -- (if ($unrollht_(C, $heaptype_typeuse(v_typeuse)) = SUB_subtype(?(), typeuse'_lst, comptype')))*{comptype' <- comptype'_lst, v_typeuse <- typeuse_lst, typeuse'_lst <- typeuse'_lst_lst} + -- Comptype_ok: `%|-%:OK`(C, v_comptype) + -- (Comptype_sub: `%|-%<:%`(C, v_comptype, comptype'))*{comptype' <- comptype'_lst} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), typeuse_lst, v_comptype),) + -- (wf_subtype: `%`(SUB_subtype(?(), typeuse'_lst, comptype'),))*{comptype' <- comptype'_lst, typeuse'_lst <- typeuse'_lst_lst} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:98.1-98.126 +relation Rectype_ok2: `%|-%:%`(context, rectype, oktypenat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:188.1-189.23 + rule empty{C : context, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypenat(i)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:191.1-194.49 + rule cons{C : context, subtype_1 : subtype, subtype_lst : subtype*, i : nat}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype_lst,)), OK_oktypenat(i)) + -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypenat(i)) + -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype_lst,)), OK_oktypenat(i + 1)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(v_subtype,))*{v_subtype <- subtype_lst} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:99.1-99.102 +relation Deftype_ok: `%|-%:OK`(context, deftype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:197.1-201.14 + rule mk_Deftype_ok{C : context, v_rectype : rectype, i : n, v_n : n, subtype_lst : subtype*}: + `%|-%:OK`(C, _DEF_deftype(v_rectype, i)) + -- Rectype_ok2: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype_lst} +++ C, v_rectype, OK_oktypenat(0)) + -- if (v_rectype = REC_rectype(`%`_list(subtype_lst,))) + -- if (i < v_n) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS subtype_lst},) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:102.1-102.108 +relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:181.1-183.41 + rule struct{C : context, ft_1_lst : fieldtype*, ft'_1_lst : fieldtype*, ft_2_lst : fieldtype*}: + `%|-%<:%`(C, STRUCT_comptype(`%`_list(ft_1_lst ++ ft'_1_lst,)), STRUCT_comptype(`%`_list(ft_2_lst,))) + -- if (|ft_1_lst| = |ft_2_lst|) + -- (Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2))*{ft_1 <- ft_1_lst, ft_2 <- ft_2_lst} + -- wf_context: `%`(C,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_1_lst ++ ft'_1_lst,)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:185.1-187.38 + rule array{C : context, ft_1 : fieldtype, ft_2 : fieldtype}: + `%|-%<:%`(C, ARRAY_comptype(ft_1), ARRAY_comptype(ft_2)) + -- Fieldtype_sub: `%|-%<:%`(C, ft_1, ft_2) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(ARRAY_comptype(ft_1),) + -- wf_comptype: `%`(ARRAY_comptype(ft_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:189.1-192.41 + rule func{C : context, t_11_lst : valtype*, t_12_lst : valtype*, t_21_lst : valtype*, t_22_lst : valtype*}: + `%|-%<:%`(C, `FUNC%->%`_comptype(`%`_resulttype(t_11_lst,), `%`_resulttype(t_12_lst,)), `FUNC%->%`_comptype(`%`_resulttype(t_21_lst,), `%`_resulttype(t_22_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21_lst,), `%`_resulttype(t_11_lst,)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12_lst,), `%`_resulttype(t_22_lst,)) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_11_lst,), `%`_resulttype(t_12_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_21_lst,), `%`_resulttype(t_22_lst,)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:103.1-103.107 +relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:195.1-197.66 + rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:199.1-202.49 + rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, final_opt : final?, typeuse_lst : typeuse*, ct : comptype, i : nat}: + `%|-%<:%`(C, deftype_1, deftype_2) + -- if ($unrolldt(deftype_1) = SUB_subtype(final_opt, typeuse_lst, ct)) + -- if (i < |typeuse_lst|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_typeuse(typeuse_lst[i]), $heaptype_deftype(deftype_2)) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(final_opt, typeuse_lst, ct),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:9.1-9.104 +relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:20.1-21.28 + rule refl{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, v_heaptype, v_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:23.1-27.48 + rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: + `%|-%<:%`(C, heaptype_1, heaptype_2) + -- Heaptype_ok: `%|-%:OK`(C, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype') + -- Heaptype_sub: `%|-%<:%`(C, heaptype', heaptype_2) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(heaptype_1,) + -- wf_heaptype: `%`(heaptype_2,) + -- wf_heaptype: `%`(heaptype',) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:29.1-30.17 + rule eq_any{C : context}: + `%|-%<:%`(C, EQ_heaptype, ANY_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(EQ_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:32.1-33.17 + rule i31_eq{C : context}: + `%|-%<:%`(C, I31_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(I31_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:35.1-36.20 + rule struct_eq{C : context}: + `%|-%<:%`(C, STRUCT_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:38.1-39.19 + rule array_eq{C : context}: + `%|-%<:%`(C, ARRAY_heaptype, EQ_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_heaptype: `%`(EQ_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:41.1-43.42 + rule struct{C : context, v_deftype : deftype, fieldtype_lst : fieldtype*}: + `%|-%<:%`(C, $heaptype_deftype(v_deftype), STRUCT_heaptype) + -- Expand: `%~~%`(v_deftype, STRUCT_comptype(`%`_list(fieldtype_lst,))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(fieldtype_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:45.1-47.40 + rule array{C : context, v_deftype : deftype, v_fieldtype : fieldtype}: + `%|-%<:%`(C, $heaptype_deftype(v_deftype), ARRAY_heaptype) + -- Expand: `%~~%`(v_deftype, ARRAY_comptype(v_fieldtype)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_comptype: `%`(ARRAY_comptype(v_fieldtype),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:49.1-51.42 + rule func{C : context, v_deftype : deftype, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%<:%`(C, $heaptype_deftype(v_deftype), FUNC_heaptype) + -- Expand: `%~~%`(v_deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:53.1-55.46 + rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $heaptype_deftype(deftype_1), $heaptype_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:57.1-59.53 + rule typeidx_l{C : context, v_typeidx : typeidx, v_heaptype : heaptype}: + `%|-%<:%`(C, _IDX_heaptype(v_typeidx), v_heaptype) + -- if ($proj_uN_0(v_typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, $heaptype_deftype(C.TYPES_context[$proj_uN_0(v_typeidx).0]), v_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(v_typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:61.1-63.53 + rule typeidx_r{C : context, v_heaptype : heaptype, v_typeidx : typeidx}: + `%|-%<:%`(C, v_heaptype, _IDX_heaptype(v_typeidx)) + -- if ($proj_uN_0(v_typeidx).0 < |C.TYPES_context|) + -- Heaptype_sub: `%|-%<:%`(C, v_heaptype, $heaptype_deftype(C.TYPES_context[$proj_uN_0(v_typeidx).0])) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(_IDX_heaptype(v_typeidx),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:65.1-67.51 + rule rec_struct{C : context, i : n, final_opt : final?, fieldtype_lst : fieldtype*}: + `%|-%<:%`(C, REC_heaptype(i), STRUCT_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final_opt, [], STRUCT_comptype(`%`_list(fieldtype_lst,)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(STRUCT_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final_opt, [], STRUCT_comptype(`%`_list(fieldtype_lst,))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:69.1-71.49 + rule rec_array{C : context, i : n, final_opt : final?, v_fieldtype : fieldtype}: + `%|-%<:%`(C, REC_heaptype(i), ARRAY_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final_opt, [], ARRAY_comptype(v_fieldtype))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(ARRAY_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final_opt, [], ARRAY_comptype(v_fieldtype)),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:73.1-75.51 + rule rec_func{C : context, i : n, final_opt : final?, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%<:%`(C, REC_heaptype(i), FUNC_heaptype) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final_opt, [], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)))) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_subtype: `%`(SUB_subtype(final_opt, [], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:77.1-79.43 + rule rec_sub{C : context, i : n, typeuse_lst : typeuse*, j : nat, final_opt : final?, ct : comptype}: + `%|-%<:%`(C, REC_heaptype(i), $heaptype_typeuse(typeuse_lst[j])) + -- if (j < |typeuse_lst|) + -- if (i < |C.RECS_context|) + -- if (C.RECS_context[i] = SUB_subtype(final_opt, typeuse_lst, ct)) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(REC_heaptype(i),) + -- wf_subtype: `%`(SUB_subtype(final_opt, typeuse_lst, ct),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:81.1-84.25 + rule none{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, NONE_heaptype, v_heaptype) + -- Heaptype_sub: `%|-%<:%`(C, v_heaptype, ANY_heaptype) + -- if (v_heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(NONE_heaptype,) + -- wf_heaptype: `%`(ANY_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:86.1-89.25 + rule nofunc{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, NOFUNC_heaptype, v_heaptype) + -- Heaptype_sub: `%|-%<:%`(C, v_heaptype, FUNC_heaptype) + -- if (v_heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(NOFUNC_heaptype,) + -- wf_heaptype: `%`(FUNC_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:91.1-94.25 + rule noexn{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, NOEXN_heaptype, v_heaptype) + -- Heaptype_sub: `%|-%<:%`(C, v_heaptype, EXN_heaptype) + -- if (v_heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(NOEXN_heaptype,) + -- wf_heaptype: `%`(EXN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:96.1-99.25 + rule noextern{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, NOEXTERN_heaptype, v_heaptype) + -- Heaptype_sub: `%|-%<:%`(C, v_heaptype, EXTERN_heaptype) + -- if (v_heaptype =/= BOT_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(NOEXTERN_heaptype,) + -- wf_heaptype: `%`(EXTERN_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:101.1-102.23 + rule bot{C : context, v_heaptype : heaptype}: + `%|-%<:%`(C, BOT_heaptype, v_heaptype) + -- wf_context: `%`(C,) + -- wf_heaptype: `%`(v_heaptype,) + -- wf_heaptype: `%`(BOT_heaptype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:10.1-10.103 +relation Reftype_sub: `%|-%<:%`(context, reftype, reftype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:105.1-107.37 + rule nonnull{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(), ht_1), REF_reftype(?(), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(), ht_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:109.1-111.37 + rule null{C : context, ht_1 : heaptype, ht_2 : heaptype}: + `%|-%<:%`(C, REF_reftype(?(NULL_null), ht_1), REF_reftype(?(NULL_null), ht_2)) + -- Heaptype_sub: `%|-%<:%`(C, ht_1, ht_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_1),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), ht_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:11.1-11.103 +relation Valtype_sub: `%|-%<:%`(context, valtype, valtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:114.1-116.46 + rule num{C : context, numtype_1 : numtype, numtype_2 : numtype}: + `%|-%<:%`(C, $valtype_numtype(numtype_1), $valtype_numtype(numtype_2)) + -- Numtype_sub: `%|-%<:%`(C, numtype_1, numtype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:118.1-120.46 + rule vec{C : context, vectype_1 : vectype, vectype_2 : vectype}: + `%|-%<:%`(C, $valtype_vectype(vectype_1), $valtype_vectype(vectype_2)) + -- Vectype_sub: `%|-%<:%`(C, vectype_1, vectype_2) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:122.1-124.46 + rule ref{C : context, reftype_1 : reftype, reftype_2 : reftype}: + `%|-%<:%`(C, $valtype_reftype(reftype_1), $valtype_reftype(reftype_2)) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(reftype_1,) + -- wf_reftype: `%`(reftype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:126.1-127.22 + rule bot{C : context, v_valtype : valtype}: + `%|-%<:%`(C, BOT_valtype, v_valtype) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(v_valtype,) + -- wf_valtype: `%`(BOT_valtype,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:132.1-132.115 +relation Resulttype_sub: `%|-%<:%`(context, resulttype, resulttype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:135.1-137.37 + rule mk_Resulttype_sub{C : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%<:%`(C, `%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)) + -- if (|t_1_lst| = |t_2_lst|) + -- (Valtype_sub: `%|-%<:%`(C, t_1, t_2))*{t_1 <- t_1_lst, t_2 <- t_2_lst} + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t_1,))*{t_1 <- t_1_lst} + -- (wf_valtype: `%`(t_2,))*{t_2 <- t_2_lst} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:150.1-150.119 +relation Storagetype_sub: `%|-%<:%`(context, storagetype, storagetype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:162.1-164.46 + rule val{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, $storagetype_valtype(valtype_1), $storagetype_valtype(valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(valtype_1,) + -- wf_valtype: `%`(valtype_2,) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:166.1-168.49 + rule pack{C : context, packtype_1 : packtype, packtype_2 : packtype}: + `%|-%<:%`(C, $storagetype_packtype(packtype_1), $storagetype_packtype(packtype_2)) + -- Packtype_sub: `%|-%<:%`(C, packtype_1, packtype_2) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:151.1-151.117 +relation Fieldtype_sub: `%|-%<:%`(context, fieldtype, fieldtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:171.1-173.40 + rule const{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(), zt_1), `%%`_fieldtype(?(), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec:175.1-178.40 + rule var{C : context, zt_1 : storagetype, zt_2 : storagetype}: + `%|-%<:%`(C, `%%`_fieldtype(?(MUT_mut), zt_1), `%%`_fieldtype(?(MUT_mut), zt_2)) + -- Storagetype_sub: `%|-%<:%`(C, zt_1, zt_2) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_1),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt_2),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Localtype_ok: `%|-%:OK`(context, localtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Localtype_ok{C : context, v_init : init, t : valtype}: + `%|-%:OK`(C, `%%`_localtype(v_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_localtype: `%`(`%%`_localtype(v_init, t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Instrtype_ok: `%|-%:OK`(context, instrtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Instrtype_ok{C : context, t_1_lst : valtype*, x_lst : idx*, t_2_lst : valtype*, lct_lst : localtype*}: + `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1_lst,)) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2_lst,)) + -- if (|lct_lst| = |x_lst|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- x_lst} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = lct))*{lct <- lct_lst, x <- x_lst} + -- wf_context: `%`(C,) + -- (wf_localtype: `%`(lct,))*{lct <- lct_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Expand_use: `%~~_%%`(typeuse, context, comptype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule deftype{v_deftype : deftype, C : context, v_comptype : comptype}: + `%~~_%%`($typeuse_deftype(v_deftype), C, v_comptype) + -- Expand: `%~~%`(v_deftype, v_comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(v_comptype,) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule typeidx{v_typeidx : typeidx, C : context, v_comptype : comptype}: + `%~~_%%`(_IDX_typeuse(v_typeidx), C, v_comptype) + -- if ($proj_uN_0(v_typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(v_typeidx).0], v_comptype) + -- wf_context: `%`(C,) + -- wf_comptype: `%`(v_comptype,) + -- wf_typeuse: `%`(_IDX_typeuse(v_typeidx),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +syntax oktypeidx = + | OK(typeidx) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation wf_oktypeidx: `%`(oktypeidx,) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule oktypeidx_case_0{var_0 : typeidx}: + `%`(OK_oktypeidx(var_0),) + -- wf_uN: `%%`(32, var_0) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Subtype_ok{C : context, x_lst : idx*, v_comptype : comptype, x_0 : idx, comptype'_lst : comptype*, yy_lst_lst : typeuse**}: + `%|-%:%`(C, SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- x_lst}, v_comptype), OK_oktypeidx(x_0)) + -- if (|x_lst| <= 1) + -- (if ($proj_uN_0(x).0 < $proj_uN_0(x_0).0))*{x <- x_lst} + -- if (|comptype'_lst| = |x_lst|) + -- if (|comptype'_lst| = |yy_lst_lst|) + -- (if ($proj_uN_0(x).0 < |C.TYPES_context|))*{x <- x_lst} + -- (if ($unrolldt(C.TYPES_context[$proj_uN_0(x).0]) = SUB_subtype(?(), yy_lst, comptype')))*{comptype' <- comptype'_lst, x <- x_lst, yy_lst <- yy_lst_lst} + -- Comptype_ok: `%|-%:OK`(C, v_comptype) + -- (Comptype_sub: `%|-%<:%`(C, v_comptype, comptype'))*{comptype' <- comptype'_lst} + -- wf_context: `%`(C,) + -- wf_subtype: `%`(SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- x_lst}, v_comptype),) + -- wf_oktypeidx: `%`(OK_oktypeidx(x_0),) + -- (wf_subtype: `%`(SUB_subtype(?(), yy_lst, comptype'),))*{comptype' <- comptype'_lst, yy_lst <- yy_lst_lst} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:96.1-96.126 +relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:179.1-180.23 + rule empty{C : context, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([],)), OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec:182.1-185.48 + rule cons{C : context, subtype_1 : subtype, subtype_lst : subtype*, x : idx}: + `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype_lst,)), OK_oktypeidx(x)) + -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) + -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype_lst,)), OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),))) + -- wf_context: `%`(C,) + -- wf_subtype: `%`(subtype_1,) + -- (wf_subtype: `%`(v_subtype,))*{v_subtype <- subtype_lst} + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + -- wf_oktypeidx: `%`(OK_oktypeidx(`%`_typeidx(($proj_uN_0(x).0 + 1),)),) +} + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Limits_ok: `%|-%:%`(context, limits, nat) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Limits_ok{C : context, v_n : n, m_opt : m?, k : nat}: + `%|-%:%`(C, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), k) + -- if (v_n <= k) + -- (if ((v_n <= v_m) /\ (v_m <= k)))?{v_m <- m_opt} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tagtype_ok: `%|-%:OK`(context, tagtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Tagtype_ok{C : context, v_typeuse : typeuse, t_1_lst : valtype*}: + `%|-%:OK`(C, v_typeuse) + -- Typeuse_ok: `%|-%:OK`(C, v_typeuse) + -- Expand_use: `%~~_%%`(v_typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_typeuse: `%`(v_typeuse,) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Globaltype_ok: `%|-%:OK`(context, globaltype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Globaltype_ok{C : context, t : valtype}: + `%|-%:OK`(C, `%%`_globaltype(?(MUT_mut), t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Memtype_ok: `%|-%:OK`(context, memtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Memtype_ok{C : context, v_addrtype : addrtype, v_limits : limits}: + `%|-%:OK`(C, `%%PAGE`_memtype(v_addrtype, v_limits)) + -- Limits_ok: `%|-%:%`(C, v_limits, (2 ^ ((($size($numtype_addrtype(v_addrtype)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(v_addrtype, v_limits),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Tabletype_ok: `%|-%:OK`(context, tabletype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mk_Tabletype_ok{C : context, v_addrtype : addrtype, v_limits : limits, v_reftype : reftype}: + `%|-%:OK`(C, `%%%`_tabletype(v_addrtype, v_limits, v_reftype)) + -- Limits_ok: `%|-%:%`(C, v_limits, ((((2 ^ $size($numtype_addrtype(v_addrtype))) : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) + -- Reftype_ok: `%|-%:OK`(C, v_reftype) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(v_addrtype, v_limits, v_reftype),) + +;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec +relation Externtype_ok: `%|-%:OK`(context, externtype) + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule tag{C : context, v_tagtype : tagtype}: + `%|-%:OK`(C, TAG_externtype(v_tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, v_tagtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(v_tagtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule global{C : context, v_globaltype : globaltype}: + `%|-%:OK`(C, GLOBAL_externtype(v_globaltype)) + -- Globaltype_ok: `%|-%:OK`(C, v_globaltype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(v_globaltype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule mem{C : context, v_memtype : memtype}: + `%|-%:OK`(C, MEM_externtype(v_memtype)) + -- Memtype_ok: `%|-%:OK`(C, v_memtype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(v_memtype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule table{C : context, v_tabletype : tabletype}: + `%|-%:OK`(C, TABLE_externtype(v_tabletype)) + -- Tabletype_ok: `%|-%:OK`(C, v_tabletype) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(v_tabletype),) + + ;; ../../../../specification/wasm-3.0/2.1-validation.types.spectec + rule func{C : context, v_typeuse : typeuse, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:OK`(C, FUNC_externtype(v_typeuse)) + -- Typeuse_ok: `%|-%:OK`(C, v_typeuse) + -- Expand_use: `%~~_%%`(v_typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype(v_typeuse),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Instrtype_sub: `%|-%<:%`(context, instrtype, instrtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Instrtype_sub{C : context, t_11_lst : valtype*, x_1_lst : idx*, t_12_lst : valtype*, t_21_lst : valtype*, x_2_lst : idx*, t_22_lst : valtype*, x_lst : idx*, t_lst : valtype*}: + `%|-%<:%`(C, `%->_%%`_instrtype(`%`_resulttype(t_11_lst,), x_1_lst, `%`_resulttype(t_12_lst,)), `%->_%%`_instrtype(`%`_resulttype(t_21_lst,), x_2_lst, `%`_resulttype(t_22_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21_lst,), `%`_resulttype(t_11_lst,)) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12_lst,), `%`_resulttype(t_22_lst,)) + -- if (x_lst = $setminus_(syntax localidx, x_2_lst, x_1_lst)) + -- if (|t_lst| = |x_lst|) + -- (if ($proj_uN_0(x).0 < |C.LOCALS_context|))*{x <- x_lst} + -- (if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)))*{t <- t_lst, x <- x_lst} + -- wf_context: `%`(C,) + -- (wf_uN: `%%`(32, x))*{x <- x_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_11_lst,), x_1_lst, `%`_resulttype(t_12_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_21_lst,), x_2_lst, `%`_resulttype(t_22_lst,)),) + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- t_lst} + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Limits_sub: `%|-%<:%`(context, limits, limits) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule max{C : context, n_1 : n, m_1 : m, n_2 : n, m_2_opt : m?}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))), `[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- m_2_opt})) + -- if (n_1 >= n_2) + -- (if (m_1 <= m_2))?{m_2 <- m_2_opt} + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?(`%`_u64(m_1,))),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), `%`_u64(m_2,)?{m_2 <- m_2_opt}),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule eps{C : context, n_1 : n, n_2 : n}: + `%|-%<:%`(C, `[%..%]`_limits(`%`_u64(n_1,), ?()), `[%..%]`_limits(`%`_u64(n_2,), ?())) + -- if (n_1 >= n_2) + -- wf_context: `%`(C,) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_1,), ?()),) + -- wf_limits: `%`(`[%..%]`_limits(`%`_u64(n_2,), ?()),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tagtype_sub: `%|-%<:%`(context, tagtype, tagtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Tagtype_sub{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, $typeuse_deftype(deftype_1), $typeuse_deftype(deftype_2)) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- Deftype_sub: `%|-%<:%`(C, deftype_2, deftype_1) + -- wf_context: `%`(C,) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Globaltype_sub: `%|-%<:%`(context, globaltype, globaltype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule const{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(), valtype_1), `%%`_globaltype(?(), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), valtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule var{C : context, valtype_1 : valtype, valtype_2 : valtype}: + `%|-%<:%`(C, `%%`_globaltype(?(MUT_mut), valtype_1), `%%`_globaltype(?(MUT_mut), valtype_2)) + -- Valtype_sub: `%|-%<:%`(C, valtype_1, valtype_2) + -- Valtype_sub: `%|-%<:%`(C, valtype_2, valtype_1) + -- wf_context: `%`(C,) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_1),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), valtype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Memtype_sub: `%|-%<:%`(context, memtype, memtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Memtype_sub{C : context, v_addrtype : addrtype, limits_1 : limits, limits_2 : limits}: + `%|-%<:%`(C, `%%PAGE`_memtype(v_addrtype, limits_1), `%%PAGE`_memtype(v_addrtype, limits_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- wf_context: `%`(C,) + -- wf_memtype: `%`(`%%PAGE`_memtype(v_addrtype, limits_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(v_addrtype, limits_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Tabletype_sub: `%|-%<:%`(context, tabletype, tabletype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mk_Tabletype_sub{C : context, v_addrtype : addrtype, limits_1 : limits, reftype_1 : reftype, limits_2 : limits, reftype_2 : reftype}: + `%|-%<:%`(C, `%%%`_tabletype(v_addrtype, limits_1, reftype_1), `%%%`_tabletype(v_addrtype, limits_2, reftype_2)) + -- Limits_sub: `%|-%<:%`(C, limits_1, limits_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_1, reftype_2) + -- Reftype_sub: `%|-%<:%`(C, reftype_2, reftype_1) + -- wf_context: `%`(C,) + -- wf_tabletype: `%`(`%%%`_tabletype(v_addrtype, limits_1, reftype_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(v_addrtype, limits_2, reftype_2),) + +;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec +relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule tag{C : context, tagtype_1 : tagtype, tagtype_2 : tagtype}: + `%|-%<:%`(C, TAG_externtype(tagtype_1), TAG_externtype(tagtype_2)) + -- Tagtype_sub: `%|-%<:%`(C, tagtype_1, tagtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TAG_externtype(tagtype_1),) + -- wf_externtype: `%`(TAG_externtype(tagtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule global{C : context, globaltype_1 : globaltype, globaltype_2 : globaltype}: + `%|-%<:%`(C, GLOBAL_externtype(globaltype_1), GLOBAL_externtype(globaltype_2)) + -- Globaltype_sub: `%|-%<:%`(C, globaltype_1, globaltype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_1),) + -- wf_externtype: `%`(GLOBAL_externtype(globaltype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule mem{C : context, memtype_1 : memtype, memtype_2 : memtype}: + `%|-%<:%`(C, MEM_externtype(memtype_1), MEM_externtype(memtype_2)) + -- Memtype_sub: `%|-%<:%`(C, memtype_1, memtype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(MEM_externtype(memtype_1),) + -- wf_externtype: `%`(MEM_externtype(memtype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule table{C : context, tabletype_1 : tabletype, tabletype_2 : tabletype}: + `%|-%<:%`(C, TABLE_externtype(tabletype_1), TABLE_externtype(tabletype_2)) + -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(TABLE_externtype(tabletype_1),) + -- wf_externtype: `%`(TABLE_externtype(tabletype_2),) + + ;; ../../../../specification/wasm-3.0/2.2-validation.subtyping.spectec + rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: + `%|-%<:%`(C, FUNC_externtype($typeuse_deftype(deftype_1)), FUNC_externtype($typeuse_deftype(deftype_2))) + -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_1)),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(deftype_2)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule valtype{C : context, valtype_opt : valtype?}: + `%|-%:%`(C, _RESULT_blocktype(valtype_opt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype_opt),))) + -- (Valtype_ok: `%|-%:OK`(C, v_valtype))?{v_valtype <- valtype_opt} + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_RESULT_blocktype(valtype_opt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(valtype_opt),)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule typeidx{C : context, v_typeidx : typeidx, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, _IDX_blocktype(v_typeidx), `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- if ($proj_uN_0(v_typeidx).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(v_typeidx).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_blocktype: `%`(_IDX_blocktype(v_typeidx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Catch_ok: `%|-%:OK`(context, catch) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch{C : context, x : idx, l : labelidx, t_lst : valtype*}: + `%|-%:OK`(C, CATCH_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_lst,), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_ref{C : context, x : idx, l : labelidx, t_lst : valtype*}: + `%|-%:OK`(C, CATCH_REF_catch(x, l)) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_lst ++ [REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_REF_catch(x, l),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_catch(l),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule catch_all_ref{C : context, l : labelidx}: + `%|-%:OK`(C, CATCH_ALL_REF_catch(l)) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype([REF_valtype(?(), EXN_heaptype)],), C.LABELS_context[$proj_uN_0(l).0]) + -- wf_context: `%`(C,) + -- wf_catch: `%`(CATCH_ALL_REF_catch(l),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +def $default_(v_valtype : valtype) : val?? + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I32_valtype) = ?(?(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(I64_valtype) = ?(?(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))))) + -- wf_val: `%`(CONST_val($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, `%`_uN(0,))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F32_valtype) = ?(?(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(F64_valtype) = ?(?(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))))) + -- wf_val: `%`(CONST_val($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_(V128_valtype) = ?(?(VCONST_val(V128_vectype, `%`_vec_(0,)))) + -- wf_val: `%`(VCONST_val(V128_vectype, `%`_vec_(0,)),) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(NULL_null), ht)) = ?(?(`REF.NULL_ADDR`_val)) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + def $default_{ht : heaptype}(REF_valtype(?(), ht)) = ?(?()) + def $default_{x0 : valtype}(x0) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Defaultable: `|-%DEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule mk_Defaultable{t : valtype}: + `|-%DEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) =/= ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Memarg_ok: `|-%:%->%`(memarg, addrtype, N) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule mk_Memarg_ok{v_n : n, v_m : m, at : addrtype, v_N : N}: + `|-%:%->%`({ALIGN `%`_u32(v_n,), OFFSET `%`_u64(v_m,)}, at, v_N) + -- if (((2 ^ v_n) : nat <:> rat) <= ((v_N : nat <:> rat) / (8 : nat <:> rat))) + -- if (v_m < (2 ^ $size($numtype_addrtype(at)))) + -- wf_memarg: `%`({ALIGN `%`_u32(v_n,), OFFSET `%`_u64(v_m,)},) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +def $is_packtype(v_storagetype : storagetype) : bool + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + def $is_packtype{zt : storagetype}(zt) = (zt =/= $storagetype_valtype($unpack(zt))) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:5.1-5.95 +relation Instr_ok: `%|-%:%`(context, instr, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:18.1-19.24 + rule nop{C : context}: + `%|-%:%`(C, NOP_instr, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(NOP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:21.1-23.42 + rule unreachable{C : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, UNREACHABLE_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:25.1-27.29 + rule drop{C : context, t : valtype}: + `%|-%:%`(C, DROP_instr, `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(DROP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:29.1-31.29 + rule select_expl{C : context, t : valtype}: + `%|-%:%`(C, SELECT_instr(?([t])), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- wf_context: `%`(C,) + -- wf_instr: `%`(SELECT_instr(?([t])),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:33.1-37.37 + rule select_impl{C : context, t : valtype, t' : valtype, v_numtype : numtype, v_vectype : vectype}: + `%|-%:%`(C, SELECT_instr(?()), `%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],))) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Valtype_sub: `%|-%<:%`(C, t, t') + -- if ((t' = $valtype_numtype(v_numtype)) \/ (t' = $valtype_vectype(v_vectype))) + -- wf_context: `%`(C,) + -- wf_valtype: `%`(t',) + -- wf_instr: `%`(SELECT_instr(?()),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t t I32_valtype],), [], `%`_resulttype([t],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:53.1-56.67 + rule block{C : context, bt : blocktype, instr_lst : instr*, t_1_lst : valtype*, t_2_lst : valtype*, x_lst : idx*}: + `%|-%:%`(C, BLOCK_instr(bt, instr_lst), `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(bt, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:58.1-61.67 + rule loop{C : context, bt : blocktype, instr_lst : instr*, t_1_lst : valtype*, t_2_lst : valtype*, x_lst : idx*}: + `%|-%:%`(C, LOOP_instr(bt, instr_lst), `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOOP_instr(bt, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_1_lst,)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:63.1-67.71 + rule if{C : context, bt : blocktype, instr_1_lst : instr*, instr_2_lst : instr*, t_1_lst : valtype*, t_2_lst : valtype*, x_1_lst : idx*, x_2_lst : idx*}: + `%|-%:%`(C, `IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [I32_valtype],), [], `%`_resulttype(t_2_lst,))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_1_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_2_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_2_lst, `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [I32_valtype],), [], `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_2_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:72.1-75.42 + rule br{C : context, l : labelidx, t_1_lst : valtype*, t_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, BR_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t_lst) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:77.1-79.25 + rule br_if{C : context, l : labelidx, t_lst : valtype*}: + `%|-%:%`(C, BR_IF_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_lst ++ [I32_valtype],), [], `%`_resulttype(t_lst,))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t_lst) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ [I32_valtype],), [], `%`_resulttype(t_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:81.1-85.49 + rule br_table{C : context, l_lst : labelidx*, l' : labelidx, t_1_lst : valtype*, t_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, BR_TABLE_instr(l_lst, l'), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst ++ [I32_valtype],), [], `%`_resulttype(t_2_lst,))) + -- (if ($proj_uN_0(l).0 < |C.LABELS_context|))*{l <- l_lst} + -- (Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_lst,), C.LABELS_context[$proj_uN_0(l).0]))*{l <- l_lst} + -- if ($proj_uN_0(l').0 < |C.LABELS_context|) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_lst,), C.LABELS_context[$proj_uN_0(l').0]) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst ++ [I32_valtype],), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_TABLE_instr(l_lst, l'),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst ++ [I32_valtype],), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:87.1-90.31 + rule br_on_null{C : context, l : labelidx, t_lst : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_lst ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t_lst ++ [REF_valtype(?(), ht)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if ($proj_list_0(syntax valtype, C.LABELS_context[$proj_uN_0(l).0]).0 = t_lst) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t_lst ++ [REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:92.1-94.40 + rule br_on_non_null{C : context, l : labelidx, t_lst : valtype*, ht : heaptype}: + `%|-%:%`(C, BR_ON_NON_NULL_instr(l), `%->_%%`_instrtype(`%`_resulttype(t_lst ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t_lst,))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t_lst ++ [REF_valtype(?(NULL_null), ht)],)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ [REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype(t_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:96.1-102.34 + rule br_on_cast{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t_lst : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t_lst ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t_lst ++ [$valtype_reftype($diffrt(rt_1, rt_2))],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t_lst ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t_lst ++ [$valtype_reftype($diffrt(rt_1, rt_2))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:104.1-110.49 + rule br_on_cast_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, t_lst : valtype*, rt : reftype}: + `%|-%:%`(C, BR_ON_CAST_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t_lst ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t_lst ++ [$valtype_reftype(rt_2)],))) + -- if ($proj_uN_0(l).0 < |C.LABELS_context|) + -- if (C.LABELS_context[$proj_uN_0(l).0] = `%`_resulttype(t_lst ++ [$valtype_reftype(rt)],)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(BR_ON_CAST_FAIL_instr(l, rt_1, rt_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ [$valtype_reftype(rt_1)],), [], `%`_resulttype(t_lst ++ [$valtype_reftype(rt_2)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:115.1-117.45 + rule call{C : context, x : idx, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:119.1-121.45 + rule call_ref{C : context, x : idx, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2_lst,))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:123.1-127.45 + rule call_indirect{C : context, x : idx, y : idx, t_1_lst : valtype*, at : addrtype, t_2_lst : valtype*, lim : limits, rt : reftype}: + `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2_lst,))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_2_lst,)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:129.1-132.42 + rule return{C : context, t_1_lst : valtype*, t_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,))) + -- if (C.RETURN_context = ?(`%`_resulttype(t_lst,))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RETURN_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:135.1-140.42 + rule return_call{C : context, x : idx, t_3_lst : valtype*, t_1_lst : valtype*, t_4_lst : valtype*, t_2_lst : valtype*, t'_2_lst : valtype*}: + `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst,), [], `%`_resulttype(t_4_lst,))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2_lst,), `%`_resulttype(t'_2_lst,)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- t'_2_lst} + -- wf_instr: `%`(RETURN_CALL_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst,), [], `%`_resulttype(t_4_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:143.1-148.42 + rule return_call_ref{C : context, x : idx, t_3_lst : valtype*, t_1_lst : valtype*, t_4_lst : valtype*, t_2_lst : valtype*, t'_2_lst : valtype*}: + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4_lst,))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2_lst,), `%`_resulttype(t'_2_lst,)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- t'_2_lst} + -- wf_instr: `%`(RETURN_CALL_REF_instr(_IDX_typeuse(x)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype(t_4_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:151.1-159.42 + rule return_call_indirect{C : context, x : idx, y : idx, t_3_lst : valtype*, t_1_lst : valtype*, at : addrtype, t_4_lst : valtype*, lim : limits, rt : reftype, t_2_lst : valtype*, t'_2_lst : valtype*}: + `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4_lst,))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) + -- if ($proj_uN_0(y).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(y).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2_lst,), `%`_resulttype(t'_2_lst,)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,))) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- t'_2_lst} + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [$valtype_addrtype(at)],), [], `%`_resulttype(t_4_lst,)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), FUNC_heaptype),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:166.1-169.42 + rule throw{C : context, x : idx, t_1_lst : valtype*, t_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,))) + -- if ($as_deftype(C.TAGS_context[$proj_uN_0(x).0]) =/= ?()) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- Expand: `%~~%`(!($as_deftype(C.TAGS_context[$proj_uN_0(x).0])), `FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ t_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:171.1-173.42 + rule throw_ref{C : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2_lst,))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(THROW_REF_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:175.1-179.34 + rule try_table{C : context, bt : blocktype, catch_lst : catch*, instr_lst : instr*, t_1_lst : valtype*, t_2_lst : valtype*, x_lst : idx*}: + `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch_lst,), instr_lst), `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- (Catch_ok: `%|-%:OK`(C, v_catch))*{v_catch <- catch_lst} + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRY_TABLE_instr(bt, `%`_list(catch_lst,), instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:202.1-204.31 + rule ref_null{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:206.1-209.20 + rule ref_func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- if (|C.REFS_context| > 0) + -- if (x <- C.REFS_context) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), $heaptype_deftype(dt))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:211.1-212.34 + rule ref_i31{C : context}: + `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:214.1-216.31 + rule ref_is_null{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:218.1-220.31 + rule ref_as_non_null{C : context, ht : heaptype}: + `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:222.1-223.51 + rule ref_eq{C : context}: + `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:225.1-229.33 + rule ref_test{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.TEST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:231.1-235.33 + rule ref_cast{C : context, rt : reftype, rt' : reftype}: + `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Reftype_ok: `%|-%:OK`(C, rt) + -- Reftype_ok: `%|-%:OK`(C, rt') + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.CAST`_instr(rt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt')],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:240.1-241.42 + rule i31_get{C : context, v_sx : sx}: + `%|-%:%`(C, `I31.GET`_instr(v_sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`I31.GET`_instr(v_sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:246.1-248.45 + rule struct_new{C : context, x : idx, zt_lst : storagetype*, mut_opt_lst : mut?*}: + `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- zt_lst},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- zt_lst},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:250.1-253.48 + rule struct_new_default{C : context, x : idx, mut_opt_lst : mut?*, zt_lst : storagetype*}: + `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- zt_lst} + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:258.1-262.41 + rule struct_get{C : context, sx_opt : sx?, x : idx, i : fieldidx, zt : storagetype, ft_lst : fieldtype*, mut_opt : mut?}: + `%|-%:%`(C, `STRUCT.GET`_instr(sx_opt, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft_lst,))) + -- if ($proj_uN_0(i).0 < |ft_lst|) + -- if (ft_lst[$proj_uN_0(i).0] = `%%`_fieldtype(mut_opt, zt)) + -- if ((sx_opt =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.GET`_instr(sx_opt, x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_lst,)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(mut_opt, zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:264.1-267.24 + rule struct_set{C : context, x : idx, i : fieldidx, zt : storagetype, ft_lst : fieldtype*}: + `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], STRUCT_comptype(`%`_list(ft_lst,))) + -- if ($proj_uN_0(i).0 < |ft_lst|) + -- if (ft_lst[$proj_uN_0(i).0] = `%%`_fieldtype(?(MUT_mut), zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.SET`_instr(x, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_lst,)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(MUT_mut), zt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:272.1-274.43 + rule array_new{C : context, x : idx, zt : storagetype, mut_opt : mut?}: + `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:276.1-279.45 + rule array_new_default{C : context, x : idx, mut_opt : mut?, zt : storagetype}: + `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:281.1-283.43 + rule array_new_fixed{C : context, x : idx, v_n : n, zt : storagetype, mut_opt : mut?}: + `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^v_n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype($unpack(zt)^v_n{},), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:285.1-288.40 + rule array_new_elem{C : context, x : idx, y : idx, mut_opt : mut?, rt : reftype}: + `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, $storagetype_reftype(rt)))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[$proj_uN_0(y).0], rt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, $storagetype_reftype(rt))),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:290.1-294.24 + rule array_new_data{C : context, x : idx, y : idx, mut_opt : mut?, zt : storagetype, v_numtype : numtype, v_vectype : vectype}: + `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if (($unpack(zt) = $valtype_numtype(v_numtype)) \/ ($unpack(zt) = $valtype_vectype(v_vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:296.1-299.41 + rule array_get{C : context, sx_opt : sx?, x : idx, zt : storagetype, mut_opt : mut?}: + `%|-%:%`(C, `ARRAY.GET`_instr(sx_opt, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ((sx_opt =/= ?()) <=> $is_packtype(zt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx_opt, x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype],), [], `%`_resulttype([$unpack(zt)],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:301.1-303.42 + rule array_set{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:305.1-306.43 + rule array_len{C : context}: + `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.LEN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:308.1-310.42 + rule array_fill{C : context, x : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:312.1-316.40 + rule array_copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, mut_opt : mut?, zt_2 : storagetype}: + `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_1).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) + -- if ($proj_uN_0(x_2).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x_2).0], ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2))) + -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:318.1-321.44 + rule array_init_elem{C : context, x : idx, y : idx, zt : storagetype}: + `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- Storagetype_sub: `%|-%<:%`(C, $storagetype_reftype(C.ELEMS_context[$proj_uN_0(y).0]), zt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:323.1-327.24 + rule array_init_data{C : context, x : idx, y : idx, zt : storagetype, v_numtype : numtype, v_vectype : vectype}: + `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) + -- if (($unpack(zt) = $valtype_numtype(v_numtype)) \/ ($unpack(zt) = $valtype_vectype(v_vectype))) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:332.1-334.26 + rule extern_convert_any{C : context, null_1_opt : null?, null_2_opt : null?}: + `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1_opt, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2_opt, EXTERN_heaptype)],))) + -- if (null_1_opt = null_2_opt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1_opt, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2_opt, EXTERN_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:336.1-338.26 + rule any_convert_extern{C : context, null_1_opt : null?, null_2_opt : null?}: + `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1_opt, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2_opt, ANY_heaptype)],))) + -- if (null_1_opt = null_2_opt) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1_opt, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2_opt, ANY_heaptype)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:343.1-345.28 + rule local_get{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(SET_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:347.1-349.29 + rule local_set{C : context, x : idx, t : valtype, v_init : init}: + `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(v_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],)),) + -- wf_localtype: `%`(`%%`_localtype(v_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:351.1-353.29 + rule local_tee{C : context, x : idx, t : valtype, v_init : init}: + `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.LOCALS_context|) + -- if (C.LOCALS_context[$proj_uN_0(x).0] = `%%`_localtype(v_init, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],)),) + -- wf_localtype: `%`(`%%`_localtype(v_init, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:358.1-360.30 + rule global_get{C : context, x : idx, t : valtype, mut_opt : mut?}: + `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(mut_opt, t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(mut_opt, t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:362.1-364.29 + rule global_set{C : context, x : idx, t : valtype}: + `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(MUT_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:369.1-371.32 + rule table_get{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:373.1-375.32 + rule table_set{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:377.1-379.32 + rule table_size{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:381.1-383.32 + rule table_grow{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: + `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:385.1-387.32 + rule table_fill{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: + `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_reftype(rt) $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:389.1-393.36 + rule table_copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_1).0] = `%%%`_tabletype(at_1, lim_1, rt_1)) + -- if ($proj_uN_0(x_2).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x_2).0] = `%%%`_tabletype(at_2, lim_2, rt_2)) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`TABLE.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_1, lim_1, rt_1),) + -- wf_tabletype: `%`(`%%%`_tabletype(at_2, lim_2, rt_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:395.1-399.36 + rule table_init{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: + `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt_1)) + -- if ($proj_uN_0(y).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(y).0] = rt_2) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt_2,) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt_1),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:401.1-403.24 + rule elem_drop{C : context, x : idx, rt : reftype}: + `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.ELEMS_context|) + -- if (C.ELEMS_context[$proj_uN_0(x).0] = rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:416.1-418.32 + rule memory_size{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.SIZE`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:420.1-422.32 + rule memory_grow{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.GROW`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(at)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:424.1-426.32 + rule memory_fill{C : context, x : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype $valtype_addrtype(at)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:428.1-431.38 + rule memory_copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: + `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x_1).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_1).0] = `%%PAGE`_memtype(at_1, lim_1)) + -- if ($proj_uN_0(x_2).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x_2).0] = `%%PAGE`_memtype(at_2, lim_2)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at_1) $valtype_addrtype(at_2) $valtype_addrtype($minat(at_1, at_2))],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_1, lim_1),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at_2, lim_2),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:433.1-436.24 + rule memory_init{C : context, x : idx, y : idx, at : addrtype, lim : limits}: + `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- if ($proj_uN_0(y).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(y).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) I32_valtype I32_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:438.1-440.24 + rule data_drop{C : context, x : idx}: + `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.DATAS_context|) + -- if (C.DATAS_context[$proj_uN_0(x).0] = OK_datatype) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:451.1-454.44 + rule load_num{C : context, nt : numtype, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr(nt, ?(), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr(nt, ?(), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:456.1-459.36 + rule load_pack{C : context, v_Inn : Inn, v_K : K, v_sx : sx, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_K,), v_sx))), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(v_Inn)],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_K,), v_sx))), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([$valtype_addrtype(v_Inn)],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:470.1-473.44 + rule store_num{C : context, nt : numtype, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr(nt, ?(), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, $size(nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr(nt, ?(), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_numtype(nt)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:475.1-478.36 + rule store_pack{C : context, v_Inn : Inn, v_K : K, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_K,),))), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(v_Inn)],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_K) + -- wf_context: `%`(C,) + -- wf_instr: `%`(STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_K,),))), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) $valtype_addrtype(v_Inn)],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:480.1-483.47 + rule vload_num{C : context, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:485.1-488.41 + rule vload_pack{C : context, v_N : N, v_M : M, v_sx : sx, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_N,), v_M, v_sx)), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, (v_N * $proj_dim_0(v_M).0)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_N,), v_M, v_sx)), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:490.1-493.36 + rule vload_splat{C : context, v_N : N, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:495.1-498.36 + rule vload_zero{C : context, v_N : N, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_N) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at)],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:500.1-504.21 + rule vload_lane{C : context, v_N : N, x : idx, v_memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, v_memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (v_N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, v_memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:506.1-509.47 + rule vstore{C : context, x : idx, v_memarg : memarg, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_instr(V128_vectype, x, v_memarg), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, $vsize(V128_vectype)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_instr(V128_vectype, x, v_memarg),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:511.1-515.21 + rule vstore_lane{C : context, v_N : N, x : idx, v_memarg : memarg, i : laneidx, at : addrtype, lim : limits}: + `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, v_memarg, i), `%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],))) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Memarg_ok: `|-%:%->%`(v_memarg, at, v_N) + -- if (($proj_uN_0(i).0 : nat <:> rat) < ((128 : nat <:> rat) / (v_N : nat <:> rat))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, v_memarg, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_addrtype(at) V128_valtype],), [], `%`_resulttype([],)),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:520.1-521.33 + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:523.1-524.34 + rule unop{C : context, nt : numtype, unop_nt : unop_}: + `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(UNOP_instr(nt, unop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:526.1-527.39 + rule binop{C : context, nt : numtype, binop_nt : binop_}: + `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(nt, binop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([$valtype_numtype(nt)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:529.1-530.39 + rule testop{C : context, nt : numtype, testop_nt : testop_}: + `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TESTOP_instr(nt, testop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:532.1-533.40 + rule relop{C : context, nt : numtype, relop_nt : relop_}: + `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(RELOP_instr(nt, relop_nt),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt) $valtype_numtype(nt)],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:535.1-536.44 + rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__}: + `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CVTOP_instr(nt_1, nt_2, cvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype(nt_2)],), [], `%`_resulttype([$valtype_numtype(nt_1)],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:541.1-542.35 + rule vconst{C : context, c : vec_}: + `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:544.1-545.41 + rule vvunop{C : context, v_vvunop : vvunop}: + `%|-%:%`(C, VVUNOP_instr(V128_vectype, v_vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, v_vvunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:547.1-548.48 + rule vvbinop{C : context, v_vvbinop : vvbinop}: + `%|-%:%`(C, VVBINOP_instr(V128_vectype, v_vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, v_vvbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:550.1-551.55 + rule vvternop{C : context, v_vvternop : vvternop}: + `%|-%:%`(C, VVTERNOP_instr(V128_vectype, v_vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, v_vvternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:553.1-554.44 + rule vvtestop{C : context, v_vvtestop : vvtestop}: + `%|-%:%`(C, VVTESTOP_instr(V128_vectype, v_vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, v_vvtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:556.1-557.37 + rule vunop{C : context, sh : shape, vunop : vunop_}: + `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:559.1-560.44 + rule vbinop{C : context, sh : shape, vbinop : vbinop_}: + `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:562.1-563.51 + rule vternop{C : context, sh : shape, vternop : vternop_}: + `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:565.1-566.40 + rule vtestop{C : context, sh : shape, vtestop : vtestop_}: + `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VTESTOP_instr(sh, vtestop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:568.1-569.44 + rule vrelop{C : context, sh : shape, vrelop : vrelop_}: + `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:571.1-572.47 + rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_}: + `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:574.1-575.33 + rule vbitmask{C : context, sh : ishape}: + `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:577.1-578.50 + rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_}: + `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, vswizzlop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:580.1-582.29 + rule vshuffle{C : context, sh : bshape, i_lst : laneidx*}: + `%|-%:%`(C, VSHUFFLE_instr(sh, i_lst), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- (if ($proj_uN_0(i).0 < (2 * $proj_dim_0($fun_dim($proj_bshape_0(sh).0)).0)))*{i <- i_lst} + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:584.1-585.44 + rule vsplat{C : context, sh : shape}: + `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VSPLAT_instr(sh),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([$valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:587.1-589.21 + rule vextract_lane{C : context, sh : shape, sx_opt : sx?, i : laneidx}: + `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx_opt, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($fun_dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTRACT_LANE_instr(sh, sx_opt, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([$valtype_numtype($unpackshape(sh))],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:591.1-593.21 + rule vreplace_lane{C : context, sh : shape, i : laneidx}: + `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],))) + -- if ($proj_uN_0(i).0 < $proj_dim_0($fun_dim(sh)).0) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VREPLACE_LANE_instr(sh, i),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype $valtype_numtype($unpackshape(sh))],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:595.1-596.50 + rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__}: + `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTUNOP_instr(sh_1, sh_2, vextunop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:598.1-599.57 + rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__}: + `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTBINOP_instr(sh_1, sh_2, vextbinop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:601.1-602.64 + rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__}: + `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_1, sh_2, vextternop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:604.1-605.48 + rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, v_sx : sx}: + `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, v_sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VNARROW_instr(sh_1, sh_2, v_sx),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:607.1-608.46 + rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__}: + `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCVTOP_instr(sh_1, sh_2, vcvtop),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:6.1-6.96 +relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:613.1-614.24 + rule empty{C : context}: + `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:616.1-618.46 + rule instr{C : context, v_instr : instr, t_1_lst : valtype*, x_lst : idx*, t_2_lst : valtype*}: + `%|-%:%`(C, [v_instr], `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Instr_ok: `%|-%:%`(C, v_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(v_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:621.1-625.82 + rule seq{C : context, instr_1_lst : instr*, instr_2_lst : instr*, t_1_lst : valtype*, x_1_lst : idx*, x_2_lst : idx*, t_3_lst : valtype*, t_2_lst : valtype*, init_lst : init*, t_lst : valtype*}: + `%|-%:%`(C, instr_1_lst ++ instr_2_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst ++ x_2_lst, `%`_resulttype(t_3_lst,))) + -- Instrs_ok: `%|-%:%`(C, instr_1_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,))) + -- if (|init_lst| = |t_lst|) + -- if (|init_lst| = |x_1_lst|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- x_1_lst} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(v_init, t)))*{v_init <- init_lst, t <- t_lst, x_1 <- x_1_lst} + -- if ($with_locals(C, x_1_lst, `%%`_localtype(SET_init, t)*{t <- t_lst}) =/= ?()) + -- Instrs_ok: `%|-%:%`(!($with_locals(C, x_1_lst, `%%`_localtype(SET_init, t)*{t <- t_lst})), instr_2_lst, `%->_%%`_instrtype(`%`_resulttype(t_2_lst,), x_2_lst, `%`_resulttype(t_3_lst,))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- instr_1_lst} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- instr_2_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst ++ x_2_lst, `%`_resulttype(t_3_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,)),) + -- (wf_localtype: `%`(`%%`_localtype(v_init, t),))*{v_init <- init_lst, t <- t_lst} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- t_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2_lst,), x_2_lst, `%`_resulttype(t_3_lst,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:627.1-631.33 + rule sub{C : context, instr_lst : instr*, it' : instrtype, it : instrtype}: + `%|-%:%`(C, instr_lst, it') + -- Instrs_ok: `%|-%:%`(C, instr_lst, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec:634.1-637.33 + rule frame{C : context, instr_lst : instr*, t_lst : valtype*, t_1_lst : valtype*, x_lst : idx*, t_2_lst : valtype*}: + `%|-%:%`(C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_lst ++ t_1_lst,), x_lst, `%`_resulttype(t_lst ++ t_2_lst,))) + -- Instrs_ok: `%|-%:%`(C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_lst,)) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ t_1_lst,), x_lst, `%`_resulttype(t_lst ++ t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) +} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok: `%|-%:%`(context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule mk_Expr_ok{C : context, instr_lst : instr*, t_lst : valtype*}: + `%|-%:%`(C, instr_lst, `%`_resulttype(t_lst,)) + -- Instrs_ok: `%|-%:%`(C, instr_lst, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,))) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,)),) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Nondefaultable: `|-%NONDEFAULTABLE`(valtype,) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule mk_Nondefaultable{t : valtype}: + `|-%NONDEFAULTABLE`(t,) + -- if ($default_(t) =/= ?()) + -- if (!($default_(t)) = ?()) + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Instr_const: `%|-%CONST`(context, instr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule const{C : context, nt : numtype, c_nt : num_}: + `%|-%CONST`(C, CONST_instr(nt, c_nt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CONST_instr(nt, c_nt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule vconst{C : context, vt : vectype, c_vt : vec_}: + `%|-%CONST`(C, VCONST_instr(vt, c_vt)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(VCONST_instr(vt, c_vt),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule ref_null{C : context, ht : heaptype}: + `%|-%CONST`(C, `REF.NULL`_instr(ht)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.NULL`_instr(ht),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule ref_i31{C : context}: + `%|-%CONST`(C, `REF.I31`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.I31`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule ref_func{C : context, x : idx}: + `%|-%CONST`(C, `REF.FUNC`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`REF.FUNC`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule struct_new{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule struct_new_default{C : context, x : idx}: + `%|-%CONST`(C, `STRUCT.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`STRUCT.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule array_new{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule array_new_default{C : context, x : idx}: + `%|-%CONST`(C, `ARRAY.NEW_DEFAULT`_instr(x)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_DEFAULT`_instr(x),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule array_new_fixed{C : context, x : idx, v_n : n}: + `%|-%CONST`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule any_convert_extern{C : context}: + `%|-%CONST`(C, `ANY.CONVERT_EXTERN`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule extern_convert_any{C : context}: + `%|-%CONST`(C, `EXTERN.CONVERT_ANY`_instr) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule global_get{C : context, x : idx, t : valtype}: + `%|-%CONST`(C, `GLOBAL.GET`_instr(x)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_globaltype: `%`(`%%`_globaltype(?(), t),) + + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule binop{C : context, v_Inn : Inn, binop : binop_}: + `%|-%CONST`(C, BINOP_instr($numtype_addrtype(v_Inn), binop)) + -- if (v_Inn <- [I32_Inn I64_Inn]) + -- if (|[mk_binop__0_binop_(v_Inn, ADD_binop_Inn) mk_binop__0_binop_(v_Inn, SUB_binop_Inn) mk_binop__0_binop_(v_Inn, MUL_binop_Inn)]| > 0) + -- if (binop <- [mk_binop__0_binop_(v_Inn, ADD_binop_Inn) mk_binop__0_binop_(v_Inn, SUB_binop_Inn) mk_binop__0_binop_(v_Inn, MUL_binop_Inn)]) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr($numtype_addrtype(v_Inn), binop),) + -- wf_binop_: `%%`($numtype_addrtype(v_Inn), mk_binop__0_binop_(v_Inn, ADD_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(v_Inn), mk_binop__0_binop_(v_Inn, SUB_binop_Inn)) + -- wf_binop_: `%%`($numtype_addrtype(v_Inn), mk_binop__0_binop_(v_Inn, MUL_binop_Inn)) + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_const: `%|-%CONST`(context, expr) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule mk_Expr_const{C : context, instr_lst : instr*}: + `%|-%CONST`(C, instr_lst) + -- (Instr_const: `%|-%CONST`(C, v_instr))*{v_instr <- instr_lst} + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + +;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec +relation Expr_ok_const: `%|-%:%CONST`(context, expr, valtype) + ;; ../../../../specification/wasm-3.0/2.3-validation.instructions.spectec + rule mk_Expr_ok_const{C : context, v_expr : expr, t : valtype}: + `%|-%:%CONST`(C, v_expr, t) + -- Expr_ok: `%|-%:%`(C, v_expr, `%`_resulttype([t],)) + -- Expr_const: `%|-%CONST`(C, v_expr) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + -- wf_valtype: `%`(t,) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Type_ok: `%|-%:%`(context, type, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Type_ok{C : context, v_rectype : rectype, dt_lst : deftype*, x : idx}: + `%|-%:%`(C, TYPE_type(v_rectype), dt_lst) + -- if ($proj_uN_0(x).0 = |C.TYPES_context|) + -- if (dt_lst = $rolldt(x, v_rectype)) + -- Rectype_ok: `%|-%:%`(C +++ {TYPES dt_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, v_rectype, OK_oktypeidx(x)) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_oktypeidx: `%`(OK_oktypeidx(x),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Tag_ok: `%|-%:%`(context, tag, tagtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Tag_ok{C : context, v_tagtype : tagtype}: + `%|-%:%`(C, TAG_tag(v_tagtype), $clos_tagtype(C, v_tagtype)) + -- Tagtype_ok: `%|-%:OK`(C, v_tagtype) + -- wf_context: `%`(C,) + -- wf_tag: `%`(TAG_tag(v_tagtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Global_ok: `%|-%:%`(context, global, globaltype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Global_ok{C : context, v_globaltype : globaltype, v_expr : expr, t : valtype}: + `%|-%:%`(C, GLOBAL_global(v_globaltype, v_expr), v_globaltype) + -- Globaltype_ok: `%|-%:OK`(C, v_globaltype) + -- if (v_globaltype = `%%`_globaltype(?(MUT_mut), t)) + -- Expr_ok_const: `%|-%:%CONST`(C, v_expr, t) + -- wf_context: `%`(C,) + -- wf_global: `%`(GLOBAL_global(v_globaltype, v_expr),) + -- wf_globaltype: `%`(`%%`_globaltype(?(MUT_mut), t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Mem_ok: `%|-%:%`(context, mem, memtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Mem_ok{C : context, v_memtype : memtype}: + `%|-%:%`(C, MEMORY_mem(v_memtype), v_memtype) + -- Memtype_ok: `%|-%:OK`(C, v_memtype) + -- wf_context: `%`(C,) + -- wf_mem: `%`(MEMORY_mem(v_memtype),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Table_ok: `%|-%:%`(context, table, tabletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Table_ok{C : context, v_tabletype : tabletype, v_expr : expr, at : addrtype, lim : limits, rt : reftype}: + `%|-%:%`(C, TABLE_table(v_tabletype, v_expr), v_tabletype) + -- Tabletype_ok: `%|-%:OK`(C, v_tabletype) + -- if (v_tabletype = `%%%`_tabletype(at, lim, rt)) + -- Expr_ok_const: `%|-%:%CONST`(C, v_expr, $valtype_reftype(rt)) + -- wf_context: `%`(C,) + -- wf_table: `%`(TABLE_table(v_tabletype, v_expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Local_ok: `%|-%:%`(context, local, localtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule set{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(SET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Defaultable: `|-%DEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule unset{C : context, t : valtype}: + `%|-%:%`(C, LOCAL_local(t), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`(C, t) + -- Nondefaultable: `|-%NONDEFAULTABLE`(t,) + -- wf_context: `%`(C,) + -- wf_local: `%`(LOCAL_local(t),) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Func_ok: `%|-%:%`(context, func, deftype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Func_ok{C : context, x : idx, local_lst : local*, v_expr : expr, t_1_lst : valtype*, t_2_lst : valtype*, lct_lst : localtype*}: + `%|-%:%`(C, FUNC_func(x, local_lst, v_expr), C.TYPES_context[$proj_uN_0(x).0]) + -- if ($proj_uN_0(x).0 < |C.TYPES_context|) + -- Expand: `%~~%`(C.TYPES_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (|lct_lst| = |local_lst|) + -- (Local_ok: `%|-%:%`(C, v_local, lct))*{lct <- lct_lst, v_local <- local_lst} + -- Expr_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- t_1_lst} ++ lct_lst, LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(`%`_resulttype(t_2_lst,)), REFS [], RECS []}, v_expr, `%`_resulttype(t_2_lst,)) + -- wf_context: `%`(C,) + -- wf_func: `%`(FUNC_func(x, local_lst, v_expr),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS `%%`_localtype(SET_init, t_1)*{t_1 <- t_1_lst} ++ lct_lst, LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(`%`_resulttype(t_2_lst,)), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Datamode_ok: `%|-%:%`(context, datamode, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context}: + `%|-%:%`(C, PASSIVE_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(PASSIVE_datamode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, v_expr : expr, at : addrtype, lim : limits}: + `%|-%:%`(C, ACTIVE_datamode(x, v_expr), OK_datatype) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = `%%PAGE`_memtype(at, lim)) + -- Expr_ok_const: `%|-%:%CONST`(C, v_expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_datamode: `%`(ACTIVE_datamode(x, v_expr),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Data_ok: `%|-%:%`(context, data, datatype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Data_ok{C : context, b_lst : byte*, v_datamode : datamode}: + `%|-%:%`(C, DATA_data(b_lst, v_datamode), OK_datatype) + -- Datamode_ok: `%|-%:%`(C, v_datamode, OK_datatype) + -- wf_context: `%`(C,) + -- wf_data: `%`(DATA_data(b_lst, v_datamode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elemmode_ok: `%|-%:%`(context, elemmode, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule passive{C : context, rt : reftype}: + `%|-%:%`(C, PASSIVE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(PASSIVE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule declare{C : context, rt : reftype}: + `%|-%:%`(C, DECLARE_elemmode, rt) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(DECLARE_elemmode,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule active{C : context, x : idx, v_expr : expr, rt : reftype, at : addrtype, lim : limits, rt' : reftype}: + `%|-%:%`(C, ACTIVE_elemmode(x, v_expr), rt) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = `%%%`_tabletype(at, lim, rt')) + -- Reftype_sub: `%|-%<:%`(C, rt, rt') + -- Expr_ok_const: `%|-%:%CONST`(C, v_expr, $valtype_addrtype(at)) + -- wf_context: `%`(C,) + -- wf_reftype: `%`(rt,) + -- wf_elemmode: `%`(ACTIVE_elemmode(x, v_expr),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt'),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Elem_ok: `%|-%:%`(context, elem, elemtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Elem_ok{C : context, v_elemtype : elemtype, expr_lst : expr*, v_elemmode : elemmode}: + `%|-%:%`(C, ELEM_elem(v_elemtype, expr_lst, v_elemmode), v_elemtype) + -- Reftype_ok: `%|-%:OK`(C, v_elemtype) + -- (Expr_ok_const: `%|-%:%CONST`(C, v_expr, $valtype_reftype(v_elemtype)))*{v_expr <- expr_lst} + -- Elemmode_ok: `%|-%:%`(C, v_elemmode, v_elemtype) + -- wf_context: `%`(C,) + -- wf_elem: `%`(ELEM_elem(v_elemtype, expr_lst, v_elemmode),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Start_ok: `%|-%:OK`(context, start) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Start_ok{C : context, x : idx}: + `%|-%:OK`(C, START_start(x)) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- Expand: `%~~%`(C.FUNCS_context[$proj_uN_0(x).0], `FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],))) + -- wf_context: `%`(C,) + -- wf_start: `%`(START_start(x),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype([],), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Import_ok: `%|-%:%`(context, import, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Import_ok{C : context, name_1 : name, name_2 : name, xt : externtype}: + `%|-%:%`(C, IMPORT_import(name_1, name_2, xt), $clos_externtype(C, xt)) + -- Externtype_ok: `%|-%:OK`(C, xt) + -- wf_context: `%`(C,) + -- wf_import: `%`(IMPORT_import(name_1, name_2, xt),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Externidx_ok: `%|-%:%`(context, externidx, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule tag{C : context, x : idx, jt : tagtype}: + `%|-%:%`(C, TAG_externidx(x), TAG_externtype(jt)) + -- if ($proj_uN_0(x).0 < |C.TAGS_context|) + -- if (C.TAGS_context[$proj_uN_0(x).0] = jt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TAG_externidx(x),) + -- wf_externtype: `%`(TAG_externtype(jt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule global{C : context, x : idx, gt : globaltype}: + `%|-%:%`(C, GLOBAL_externidx(x), GLOBAL_externtype(gt)) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = gt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(GLOBAL_externidx(x),) + -- wf_externtype: `%`(GLOBAL_externtype(gt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mem{C : context, x : idx, mt : memtype}: + `%|-%:%`(C, MEM_externidx(x), MEM_externtype(mt)) + -- if ($proj_uN_0(x).0 < |C.MEMS_context|) + -- if (C.MEMS_context[$proj_uN_0(x).0] = mt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(MEM_externidx(x),) + -- wf_externtype: `%`(MEM_externtype(mt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule table{C : context, x : idx, tt : tabletype}: + `%|-%:%`(C, TABLE_externidx(x), TABLE_externtype(tt)) + -- if ($proj_uN_0(x).0 < |C.TABLES_context|) + -- if (C.TABLES_context[$proj_uN_0(x).0] = tt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(TABLE_externidx(x),) + -- wf_externtype: `%`(TABLE_externtype(tt),) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule func{C : context, x : idx, dt : deftype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype($typeuse_deftype(dt))) + -- if ($proj_uN_0(x).0 < |C.FUNCS_context|) + -- if (C.FUNCS_context[$proj_uN_0(x).0] = dt) + -- wf_context: `%`(C,) + -- wf_externidx: `%`(FUNC_externidx(x),) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(dt)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Export_ok: `%|-%:%%`(context, export, name, externtype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Export_ok{C : context, v_name : name, v_externidx : externidx, xt : externtype}: + `%|-%:%%`(C, EXPORT_export(v_name, v_externidx), v_name, xt) + -- Externidx_ok: `%|-%:%`(C, v_externidx, xt) + -- wf_context: `%`(C,) + -- wf_externtype: `%`(xt,) + -- wf_export: `%`(EXPORT_export(v_name, v_externidx),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:138.1-138.100 +relation Globals_ok: `%|-%:%`(context, global*, globaltype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:183.1-184.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:186.1-189.54 + rule cons{C : context, global_1 : global, global_lst : global*, gt_1 : globaltype, gt_lst : globaltype*}: + `%|-%:%`(C, [global_1] ++ global_lst, [gt_1] ++ gt_lst) + -- Global_ok: `%|-%:%`(C, global_1, gt_1) + -- Globals_ok: `%|-%:%`(C +++ {TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, global_lst, gt_lst) + -- wf_context: `%`(C,) + -- wf_global: `%`(global_1,) + -- (wf_global: `%`(v_global,))*{v_global <- global_lst} + -- (wf_globaltype: `%`(gt,))*{gt <- gt_lst} + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [gt_1], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:137.1-137.98 +relation Types_ok: `%|-%:%`(context, type*, deftype*) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:175.1-176.17 + rule empty{C : context}: + `%|-%:%`(C, [], []) + -- wf_context: `%`(C,) + + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec:178.1-181.49 + rule cons{C : context, type_1 : type, type_lst : type*, dt_1_lst : deftype*, dt_lst : deftype*}: + `%|-%:%`(C, [type_1] ++ type_lst, dt_1_lst ++ dt_lst) + -- Type_ok: `%|-%:%`(C, type_1, dt_1_lst) + -- Types_ok: `%|-%:%`(C +++ {TYPES dt_1_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type_lst, dt_lst) + -- wf_context: `%`(C,) + -- wf_context: `%`({TYPES dt_1_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +syntax nonfuncs = + | `%%%%%`(global_lst : global*, mem_lst : mem*, table_lst : table*, elem_lst : elem*, export_lst : export*) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation wf_nonfuncs: `%`(nonfuncs,) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule nonfuncs_case_0{global_lst : global*, mem_lst : mem*, table_lst : table*, elem_lst : elem*, export_lst : export*}: + `%`(`%%%%%`_nonfuncs(global_lst, mem_lst, table_lst, elem_lst, export_lst),) + -- (wf_global: `%`(v_global,))*{v_global <- global_lst} + -- (wf_mem: `%`(v_mem,))*{v_mem <- mem_lst} + -- (wf_table: `%`(v_table,))*{v_table <- table_lst} + -- (wf_elem: `%`(v_elem,))*{v_elem <- elem_lst} + -- (wf_export: `%`(v_export,))*{v_export <- export_lst} + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +def $funcidx_nonfuncs(v_nonfuncs : nonfuncs) : funcidx* + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + def $funcidx_nonfuncs{global_lst : global*, mem_lst : mem*, table_lst : table*, elem_lst : elem*, export_lst : export*}(`%%%%%`_nonfuncs(global_lst, mem_lst, table_lst, elem_lst, export_lst)) = $funcidx_module(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list([],), `%`_list([],), `%`_list(elem_lst,), ?(), `%`_list(export_lst,))) + -- wf_module: `%`(MODULE_module(`%`_list([],), `%`_list([],), `%`_list([],), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list([],), `%`_list([],), `%`_list(elem_lst,), ?(), `%`_list(export_lst,)),) + +;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec +relation Module_ok: `|-%:%`(module, moduletype) + ;; ../../../../specification/wasm-3.0/2.4-validation.modules.spectec + rule mk_Module_ok{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*, C : context, xt_I_lst : externtype*, xt_E_lst : externtype*, dt'_lst : deftype*, C' : context, jt_lst : tagtype*, gt_lst : globaltype*, mt_lst : memtype*, tt_lst : tabletype*, dt_lst : deftype*, ok_lst : datatype*, rt_lst : reftype*, nm_lst : name*, jt_I_lst : tagtype*, mt_I_lst : memtype*, tt_I_lst : tabletype*, gt_I_lst : globaltype*, dt_I_lst : deftype*, x_lst : idx*}: + `|-%:%`(MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)), $clos_moduletype(C, `%->%`_moduletype(xt_I_lst, xt_E_lst))) + -- Types_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, type_lst, dt'_lst) + -- if (|import_lst| = |xt_I_lst|) + -- (Import_ok: `%|-%:%`({TYPES dt'_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, v_import, xt_I))*{v_import <- import_lst, xt_I <- xt_I_lst} + -- if (|jt_lst| = |tag_lst|) + -- (Tag_ok: `%|-%:%`(C', v_tag, jt))*{jt <- jt_lst, v_tag <- tag_lst} + -- Globals_ok: `%|-%:%`(C', global_lst, gt_lst) + -- if (|mem_lst| = |mt_lst|) + -- (Mem_ok: `%|-%:%`(C', v_mem, mt))*{v_mem <- mem_lst, mt <- mt_lst} + -- if (|table_lst| = |tt_lst|) + -- (Table_ok: `%|-%:%`(C', v_table, tt))*{v_table <- table_lst, tt <- tt_lst} + -- if (|dt_lst| = |func_lst|) + -- (Func_ok: `%|-%:%`(C, v_func, dt))*{dt <- dt_lst, v_func <- func_lst} + -- if (|data_lst| = |ok_lst|) + -- (Data_ok: `%|-%:%`(C, v_data, ok))*{v_data <- data_lst, ok <- ok_lst} + -- if (|elem_lst| = |rt_lst|) + -- (Elem_ok: `%|-%:%`(C, v_elem, rt))*{v_elem <- elem_lst, rt <- rt_lst} + -- (Start_ok: `%|-%:OK`(C, v_start))?{v_start <- start_opt} + -- if (|export_lst| = |nm_lst|) + -- if (|export_lst| = |xt_E_lst|) + -- (Export_ok: `%|-%:%%`(C, v_export, nm, xt_E))*{v_export <- export_lst, nm <- nm_lst, xt_E <- xt_E_lst} + -- if $disjoint_(syntax name, nm_lst) + -- if (C = C' +++ {TYPES [], TAGS jt_I_lst ++ jt_lst, GLOBALS gt_lst, MEMS mt_I_lst ++ mt_lst, TABLES tt_I_lst ++ tt_lst, FUNCS [], DATAS ok_lst, ELEMS rt_lst, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- if (C' = {TYPES dt'_lst, TAGS [], GLOBALS gt_I_lst, MEMS [], TABLES [], FUNCS dt_I_lst ++ dt_lst, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x_lst, RECS []}) + -- if (x_lst = $funcidx_nonfuncs(`%%%%%`_nonfuncs(global_lst, mem_lst, table_lst, elem_lst, export_lst))) + -- if (jt_I_lst = $tagsxt(xt_I_lst)) + -- if (gt_I_lst = $globalsxt(xt_I_lst)) + -- if (mt_I_lst = $memsxt(xt_I_lst)) + -- if (tt_I_lst = $tablesxt(xt_I_lst)) + -- if (dt_I_lst = $funcsxt(xt_I_lst)) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- (wf_name: `%`(nm,))*{nm <- nm_lst} + -- wf_module: `%`(MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I_lst, xt_E_lst),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES [], TAGS jt_I_lst ++ jt_lst, GLOBALS gt_lst, MEMS mt_I_lst ++ mt_lst, TABLES tt_I_lst ++ tt_lst, FUNCS [], DATAS ok_lst, ELEMS rt_lst, LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- wf_context: `%`({TYPES dt'_lst, TAGS [], GLOBALS gt_I_lst, MEMS [], TABLES [], FUNCS dt_I_lst ++ dt_lst, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x_lst, RECS []},) + -- wf_nonfuncs: `%`(`%%%%%`_nonfuncs(global_lst, mem_lst, table_lst, elem_lst, export_lst),) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed2 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed2_0(x : relaxed2) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed2_0{v_num_0 : nat}(`%`_relaxed2(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed2: `%`(relaxed2,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed2_case_0{i : nat}: + `%`(`%`_relaxed2(i,),) + -- if ((i = 0) \/ (i = 1)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +syntax relaxed4 = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $proj_relaxed4_0(x : relaxed4) : (nat,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $proj_relaxed4_0{v_num_0 : nat}(`%`_relaxed4(v_num_0,)) = (v_num_0,) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +relation wf_relaxed4: `%`(relaxed4,) + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + rule relaxed4_case_0{i : nat}: + `%`(`%`_relaxed4(i,),) + -- if ((((i = 0) \/ (i = 1)) \/ (i = 2)) \/ (i = 3)) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $fun_relaxed2(v_relaxed2 : relaxed2, syntax X, X_0 : X, X_1 : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $fun_relaxed2{i : relaxed2, syntax X, X_1 : X, X_2 : X}(i, syntax X, X_1, X_2) = (if $ND then [X_1 X_2][$proj_relaxed2_0(i).0] else [X_1 X_2][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $fun_relaxed4(v_relaxed4 : relaxed4, syntax X, X_0 : X, X_1 : X, X_2 : X, X_3 : X) : X + ;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec + def $fun_relaxed4{i : relaxed4, syntax X, X_1 : X, X_2 : X, X_3 : X, X_4 : X}(i, syntax X, X_1, X_2, X_3, X_4) = (if $ND then [X_1 X_2 X_3 X_4][$proj_relaxed4_0(i).0] else [X_1 X_2 X_3 X_4][0]) + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmadd : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmin : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_fmax : relaxed4 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_idot_add : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_iq15mulr : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_u : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_trunc_s : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_swizzle : relaxed2 + +;; ../../../../specification/wasm-3.0/3.0-numerics.relaxed.spectec +def $R_laneselect : relaxed2 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $s33_to_u32(v_s33 : s33) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibits_(v_N : N, v_iN : iN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbits_(v_N : N, v_fN : fN) : bit* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibytes_(v_N : N, v_iN : iN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fbytes_(v_N : N, v_fN : fN) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $nbytes_(v_numtype : numtype, v_num_ : num_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $vbytes_(v_vectype : vectype, v_vec_ : vec_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $zbytes_(v_storagetype : storagetype, v_lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cbytes_(v_Cnn : Cnn, v_lit_ : lit_) : byte* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibits_(v_N : N, var_0 : bit*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbits_(v_N : N, var_0 : bit*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_ibytes_(v_N : N, var_0 : byte*) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_fbytes_(v_N : N, var_0 : byte*) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_nbytes_(v_numtype : numtype, var_0 : byte*) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_vbytes_(v_vectype : vectype, var_0 : byte*) : vec_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_zbytes_(v_storagetype : storagetype, var_0 : byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_cbytes_(v_Cnn : Cnn, var_0 : byte*) : lit_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $signed_(v_N : N, nat : nat) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{v_N : nat, i : nat}(v_N, i) = (i : nat <:> int) + -- if (i < (2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $signed_{v_N : nat, i : nat}(v_N, i) = ((i : nat <:> int) - ((2 ^ v_N) : nat <:> int)) + -- if (((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) <= i) /\ (i < (2 ^ v_N))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inv_signed_(v_N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{v_N : nat, i : int}(v_N, i) = (i : int <:> nat) + -- if (((0 : nat <:> int) <= i) /\ (i < ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inv_signed_{v_N : nat, i : int}(v_N, i) = ((i + ((2 ^ v_N) : nat <:> int)) : int <:> nat) + -- if ((- ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= i) /\ (i < (0 : nat <:> int))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_sx(v_storagetype : storagetype) : sx? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(BOT_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx{null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(V128_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(F64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(F32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(I64_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(I32_storagetype) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(I8_storagetype) = ?(S_sx) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_sx(I16_storagetype) = ?(S_sx) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_zero(v_lanetype : lanetype) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(I32_lanetype) = mk_lane__2_lane_(I32_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(I64_lanetype) = mk_lane__2_lane_(I64_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(I8_lanetype) = mk_lane__2_lane_(I8_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(I16_lanetype) = mk_lane__2_lane_(I16_Jnn, `%`_uN(0,)) + -- wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, `%`_uN(0,))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(F32_lanetype) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $fzero($size($numtype_Fnn(F32_Fnn)))))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_zero(F64_lanetype) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn))))) + -- wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $fzero($size($numtype_Fnn(F64_Fnn)))))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $bool(v_bool : bool) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(false) = 0 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $bool(true) = 1 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $truncz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ceilz(rat : rat) : int + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_u_(v_N : N, int : int) : nat + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_u_{v_N : nat, i : int}(v_N, i) = (if (i < (0 : nat <:> int)) then 0 else (if (i > (((2 ^ v_N) : nat <:> int) - (1 : nat <:> int))) then ((((2 ^ v_N) : nat <:> int) - (1 : nat <:> int)) : int <:> nat) else (i : int <:> nat))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $sat_s_(v_N : N, int : int) : int + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $sat_s_{v_N : nat, i : int}(v_N, i) = (if (i < - ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)) then - ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) else (if (i > (((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int))) then (((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) - (1 : nat <:> int)) else i)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ineg_(v_N : N, v_iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ineg_{v_N : nat, i_1 : uN}(v_N, i_1) = `%`_iN((((((2 ^ v_N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ v_N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(v_N, `%`_uN((((((2 ^ v_N) : nat <:> int) - ($proj_uN_0(i_1).0 : nat <:> int)) \ ((2 ^ v_N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iabs_(v_N : N, v_iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iabs_{v_N : nat, i_1 : uN}(v_N, i_1) = (if ($signed_(v_N, $proj_uN_0(i_1).0) >= (0 : nat <:> int)) then i_1 else $ineg_(v_N, i_1)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iclz_(v_N : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ictz_(v_N : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ipopcnt_(v_N : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iextend_(v_N : N, v_K : K, v_sx : sx, v_iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{v_N : nat, v_K : nat, i : uN}(v_N, v_K, U_sx, i) = `%`_iN(($proj_uN_0(i).0 \ (2 ^ v_K)),) + -- wf_uN: `%%`(v_N, `%`_uN(($proj_uN_0(i).0 \ (2 ^ v_K)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iextend_{v_N : nat, v_K : nat, i : uN}(v_N, v_K, S_sx, i) = `%`_iN($inv_signed_(v_N, $signed_(v_K, ($proj_uN_0(i).0 \ (2 ^ v_K)))),) + -- wf_uN: `%%`(v_N, `%`_uN($inv_signed_(v_N, $signed_(v_K, ($proj_uN_0(i).0 \ (2 ^ v_K)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ v_N)),) + -- wf_uN: `%%`(v_N, `%`_uN((($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) \ (2 ^ v_N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, i_1, i_2) = `%`_iN(((((((2 ^ v_N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ v_N) : nat <:> int)) : int <:> nat),) + -- wf_uN: `%%`(v_N, `%`_uN(((((((2 ^ v_N) + $proj_uN_0(i_1).0) : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int)) \ ((2 ^ v_N) : nat <:> int)) : int <:> nat),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imul_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imul_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, i_1, i_2) = `%`_iN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ v_N)),) + -- wf_uN: `%%`(v_N, `%`_uN((($proj_uN_0(i_1).0 * $proj_uN_0(i_2).0) \ (2 ^ v_N)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $idiv_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{v_N : nat, i_1 : uN}(v_N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = ?(`%`_iN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + -- wf_uN: `%%`(v_N, `%`_uN(($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{v_N : nat, i_1 : uN}(v_N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = ?() + -- if ((($signed_(v_N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(v_N, $proj_uN_0(i_2).0) : int <:> rat)) = ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $idiv_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(v_N, $truncz((($signed_(v_N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(v_N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + -- wf_uN: `%%`(v_N, `%`_uN($inv_signed_(v_N, $truncz((($signed_(v_N, $proj_uN_0(i_1).0) : int <:> rat) / ($signed_(v_N, $proj_uN_0(i_2).0) : int <:> rat)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irem_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN? + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{v_N : nat, i_1 : uN}(v_N, U_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = ?(`%`_iN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + -- wf_uN: `%%`(v_N, `%`_uN(((($proj_uN_0(i_1).0 : nat <:> int) - (($proj_uN_0(i_2).0 * ($truncz((($proj_uN_0(i_1).0 : nat <:> rat) / ($proj_uN_0(i_2).0 : nat <:> rat))) : int <:> nat)) : nat <:> int)) : int <:> nat),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{v_N : nat, i_1 : uN}(v_N, S_sx, i_1, `%`_iN(0,)) = ?() + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $irem_{v_N : nat, i_1 : uN, i_2 : uN, j_1 : int, j_2 : int}(v_N, S_sx, i_1, i_2) = ?(`%`_iN($inv_signed_(v_N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + -- if ((j_1 = $signed_(v_N, $proj_uN_0(i_1).0)) /\ (j_2 = $signed_(v_N, $proj_uN_0(i_2).0))) + -- wf_uN: `%%`(v_N, `%`_uN($inv_signed_(v_N, (j_1 - (j_2 * $truncz(((j_1 : int <:> rat) / (j_2 : int <:> rat)))))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imin_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imin_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = (if ($signed_(v_N, $proj_uN_0(i_1).0) <= $signed_(v_N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $imax_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = i_1 + -- if ($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = i_2 + -- if ($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $imax_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = (if ($signed_(v_N, $proj_uN_0(i_1).0) >= $signed_(v_N, $proj_uN_0(i_2).0)) then i_1 else i_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iadd_sat_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_iN($sat_u_(v_N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),) + -- wf_uN: `%%`(v_N, `%`_uN($sat_u_(v_N, (($proj_uN_0(i_1).0 + $proj_uN_0(i_2).0) : nat <:> int)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $iadd_sat_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(v_N, $sat_s_(v_N, ($signed_(v_N, $proj_uN_0(i_1).0) + $signed_(v_N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(v_N, `%`_uN($inv_signed_(v_N, $sat_s_(v_N, ($signed_(v_N, $proj_uN_0(i_1).0) + $signed_(v_N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $isub_sat_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_iN($sat_u_(v_N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),) + -- wf_uN: `%%`(v_N, `%`_uN($sat_u_(v_N, (($proj_uN_0(i_1).0 : nat <:> int) - ($proj_uN_0(i_2).0 : nat <:> int))),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $isub_sat_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_iN($inv_signed_(v_N, $sat_s_(v_N, ($signed_(v_N, $proj_uN_0(i_1).0) - $signed_(v_N, $proj_uN_0(i_2).0)))),) + -- wf_uN: `%%`(v_N, `%`_uN($inv_signed_(v_N, $sat_s_(v_N, ($signed_(v_N, $proj_uN_0(i_1).0) - $signed_(v_N, $proj_uN_0(i_2).0)))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iq15mulr_sat_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_q15mulr_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iavgr_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inot_(v_N : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irev_(v_N : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iand_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $iandnot_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ior_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ixor_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishl_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ishr_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotl_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irotr_(v_N : N, v_iN : iN, v_iN_0 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ibitselect_(v_N : N, v_iN : iN, v_iN_0 : iN, v_iN_1 : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $irelaxed_laneselect_(v_N : N, v_iN : iN, v_iN_0 : iN, v_iN_1 : iN) : iN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieqz_(v_N : N, v_iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieqz_{v_N : nat, i_1 : uN}(v_N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 = 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 = 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $inez_(v_N : N, v_iN : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $inez_{v_N : nat, i_1 : uN}(v_N, i_1) = `%`_u32($bool(($proj_uN_0(i_1).0 =/= 0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 =/= 0)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ieq_(v_N : N, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ieq_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, i_1, i_2) = `%`_u32($bool((i_1 = i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 = i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ine_(v_N : N, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ine_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, i_1, i_2) = `%`_u32($bool((i_1 =/= i_2)),) + -- wf_uN: `%%`(32, `%`_uN($bool((i_1 =/= i_2)),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ilt_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 < $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ilt_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(v_N, $proj_uN_0(i_1).0) < $signed_(v_N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(v_N, $proj_uN_0(i_1).0) < $signed_(v_N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $igt_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 > $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $igt_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(v_N, $proj_uN_0(i_1).0) > $signed_(v_N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(v_N, $proj_uN_0(i_1).0) > $signed_(v_N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ile_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 <= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ile_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(v_N, $proj_uN_0(i_1).0) <= $signed_(v_N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(v_N, $proj_uN_0(i_1).0) <= $signed_(v_N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ige_(v_N : N, v_sx : sx, v_iN : iN, v_iN_0 : iN) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, U_sx, i_1, i_2) = `%`_u32($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),) + -- wf_uN: `%%`(32, `%`_uN($bool(($proj_uN_0(i_1).0 >= $proj_uN_0(i_2).0)),)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $ige_{v_N : nat, i_1 : uN, i_2 : uN}(v_N, S_sx, i_1, i_2) = `%`_u32($bool(($signed_(v_N, $proj_uN_0(i_1).0) >= $signed_(v_N, $proj_uN_0(i_2).0))),) + -- wf_uN: `%%`(32, `%`_uN($bool(($signed_(v_N, $proj_uN_0(i_1).0) >= $signed_(v_N, $proj_uN_0(i_2).0))),)) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fabs_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fneg_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsqrt_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fceil_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ffloor_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $ftrunc_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fnearest_(v_N : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fadd_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fsub_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmul_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fdiv_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmin_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fmax_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmin_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fpmax_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_min_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_max_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fcopysign_(v_N : N, v_fN : fN, v_fN_0 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $feq_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fne_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $flt_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fgt_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fle_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fge_(v_N : N, v_fN : fN, v_fN_0 : fN) : u32 + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_madd_(v_N : N, v_fN : fN, v_fN_0 : fN, v_fN_1 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $frelaxed_nmadd_(v_N : N, v_fN : fN, v_fN_0 : fN, v_fN_1 : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $wrap__(v_N : N, N' : N, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $extend__(v_N : N, N' : N, v_sx : sx, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc__(v_N : N, N' : N, v_sx : sx, v_fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $trunc_sat__(v_N : N, N' : N, v_sx : sx, v_fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $relaxed_trunc__(v_N : N, N' : N, v_sx : sx, v_fN : fN) : iN? + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $demote__(v_N : N, N' : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $promote__(v_N : N, N' : N, v_fN : fN) : fN* + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $convert__(v_N : N, N' : N, v_sx : sx, v_iN : iN) : fN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $narrow__(v_N : N, N' : N, v_sx : sx, v_iN : iN) : iN + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $reinterpret__(numtype_1 : numtype, numtype_2 : numtype, v_num_ : num_) : num_ + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lpacknum_(v_lanetype : lanetype, v_num_ : num_) : lane_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I32_lanetype, c) = mk_lane__0_lane_(I32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I32_numtype), mk_lane__0_lane_(I32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(I64_lanetype, c) = mk_lane__0_lane_(I64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(I64_numtype), mk_lane__0_lane_(I64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F32_lanetype, c) = mk_lane__0_lane_(F32_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F32_numtype), mk_lane__0_lane_(F32_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : num_}(F64_lanetype, c) = mk_lane__0_lane_(F64_numtype, c) + -- wf_lane_: `%%`($lanetype_numtype(F64_numtype), mk_lane__0_lane_(F64_numtype, c)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I8_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I8_packtype), mk_lane__1_lane_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lpacknum_{c : uN}(I16_lanetype, mk_num__0_num_(I32_Inn, c)) = mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lane_: `%%`($lanetype_packtype(I16_packtype), mk_lane__1_lane_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cpacknum_(v_storagetype : storagetype, v_lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I8_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I8_packtype), mk_lit__2_lit_(I8_packtype, $wrap__($size($lunpack($lanetype_packtype(I8_packtype))), $psize(I8_packtype), c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cpacknum_{c : uN}(I16_storagetype, mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, c))) = mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c)) + -- wf_lit_: `%%`($storagetype_packtype(I16_packtype), mk_lit__2_lit_(I16_packtype, $wrap__($size($lunpack($lanetype_packtype(I16_packtype))), $psize(I16_packtype), c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $lunpacknum_(v_lanetype : lanetype, v_lane_ : lane_) : num_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I32_lanetype, mk_lane__0_lane_(I32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(I64_lanetype, mk_lane__0_lane_(I64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F32_lanetype, mk_lane__0_lane_(F32_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : num_}(F64_lanetype, mk_lane__0_lane_(F64_numtype, c)) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I8_lanetype, mk_lane__1_lane_(I8_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I8_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $lunpacknum_{c : uN}(I16_lanetype, mk_lane__1_lane_(I16_packtype, c)) = mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)) + -- wf_num_: `%%`($lunpack($lanetype_packtype(I16_packtype)), mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $cunpacknum_(v_storagetype : storagetype, v_lit_ : lit_) : lit_ + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(I64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F32_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(F64_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : lit_}(V128_storagetype, c) = c + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I8_storagetype, mk_lit__2_lit_(I8_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I8_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), $size($lunpack($lanetype_packtype(I8_packtype))), U_sx, c)))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $cunpacknum_{c : uN}(I16_storagetype, mk_lit__2_lit_(I16_packtype, c)) = mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c))) + -- wf_lit_: `%%`($storagetype_consttype(!($cunpack($storagetype_packtype(I16_packtype)))), mk_lit__0_lit_(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), $size($lunpack($lanetype_packtype(I16_packtype))), U_sx, c)))) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_unop_(v_numtype : numtype, v_unop_ : unop_, v_num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iclz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iclz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ictz_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ictz_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ipopcnt_($sizenn($numtype_addrtype(I32_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ipopcnt_($sizenn($numtype_addrtype(I64_Inn)), i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{N' : nat, i : uN}(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I32_Inn, i)) = [mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iextend_($sizenn($numtype_addrtype(I32_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{N' : nat, i : uN}(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(N',),)), mk_num__0_num_(I64_Inn, i)) = [mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iextend_($sizenn($numtype_addrtype(I64_Inn)), N', S_sx, i))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#2)*{iter_0#2 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#1)))*{iter_0#1 <- $fabs_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#4)*{iter_0#4 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#3)))*{iter_0#3 <- $fabs_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#6)*{iter_0#6 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#5)))*{iter_0#5 <- $fneg_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#8)*{iter_0#8 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#7)))*{iter_0#7 <- $fneg_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#10)*{iter_0#10 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#9)))*{iter_0#9 <- $fsqrt_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#12)*{iter_0#12 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#11)))*{iter_0#11 <- $fsqrt_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#14)*{iter_0#14 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#13)))*{iter_0#13 <- $fceil_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#16)*{iter_0#16 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#15)))*{iter_0#15 <- $fceil_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#18)*{iter_0#18 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#17)))*{iter_0#17 <- $ffloor_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#20)*{iter_0#20 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#19)))*{iter_0#19 <- $ffloor_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#22)*{iter_0#22 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#21)))*{iter_0#21 <- $ftrunc_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#24)*{iter_0#24 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#23)))*{iter_0#23 <- $ftrunc_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F32_Fnn, v_f)) = mk_num__1_num_(F32_Fnn, iter_0#26)*{iter_0#26 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#25)))*{iter_0#25 <- $fnearest_($sizenn($numtype_Fnn(F32_Fnn)), v_f)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_unop_{v_f : fN}(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn), mk_num__1_num_(F64_Fnn, v_f)) = mk_num__1_num_(F64_Fnn, iter_0#28)*{iter_0#28 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#27)))*{iter_0#27 <- $fnearest_($sizenn($numtype_Fnn(F64_Fnn)), v_f)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_binop_(v_numtype : numtype, v_binop_ : binop_, v_num_ : num_, v_num__0 : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iadd_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iadd_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $isub_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $isub_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $imul_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $imul_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#30)*{iter_0#30 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#29)))*{iter_0#29 <- lift($idiv_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#32)*{iter_0#32 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#31)))*{iter_0#31 <- lift($idiv_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = mk_num__0_num_(I32_Inn, iter_0#34)*{iter_0#34 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#33)))*{iter_0#33 <- lift($irem_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = mk_num__0_num_(I64_Inn, iter_0#36)*{iter_0#36 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#35)))*{iter_0#35 <- lift($irem_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $iand_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $iand_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ior_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ior_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ixor_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ixor_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $ishr_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $ishr_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotl_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotl_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = [mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $irotr_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = [mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $irotr_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#38)*{iter_0#38 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#37)))*{iter_0#37 <- $fadd_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#40)*{iter_0#40 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#39)))*{iter_0#39 <- $fadd_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#42)*{iter_0#42 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#41)))*{iter_0#41 <- $fsub_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#44)*{iter_0#44 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#43)))*{iter_0#43 <- $fsub_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#46)*{iter_0#46 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#45)))*{iter_0#45 <- $fmul_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#48)*{iter_0#48 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#47)))*{iter_0#47 <- $fmul_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#50)*{iter_0#50 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#49)))*{iter_0#49 <- $fdiv_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#52)*{iter_0#52 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#51)))*{iter_0#51 <- $fdiv_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#54)*{iter_0#54 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#53)))*{iter_0#53 <- $fmin_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#56)*{iter_0#56 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#55)))*{iter_0#55 <- $fmin_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#58)*{iter_0#58 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#57)))*{iter_0#57 <- $fmax_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#60)*{iter_0#60 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#59)))*{iter_0#59 <- $fmax_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = mk_num__1_num_(F32_Fnn, iter_0#62)*{iter_0#62 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#61)))*{iter_0#61 <- $fcopysign_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_binop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = mk_num__1_num_(F64_Fnn, iter_0#64)*{iter_0#64 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#63)))*{iter_0#63 <- $fcopysign_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2)} + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_testop_(v_numtype : numtype, v_testop_ : testop_, v_num_ : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_testop_{i : uN}(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn), mk_num__0_num_(I32_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I32_Inn)), i) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_testop_{i : uN}(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn), mk_num__0_num_(I64_Inn, i)) = $ieqz_($sizenn($numtype_addrtype(I64_Inn)), i) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_relop_(v_numtype : numtype, v_relop_ : relop_, v_num_ : num_, v_num__0 : num_) : u32 + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ieq_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I32_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ine_($sizenn($numtype_addrtype(I64_Inn)), i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ilt_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $igt_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ile_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(v_sx)), mk_num__0_num_(I32_Inn, i_1), mk_num__0_num_(I32_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I32_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{v_sx : sx, i_1 : uN, i_2 : uN}(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(v_sx)), mk_num__0_num_(I64_Inn, i_1), mk_num__0_num_(I64_Inn, i_2)) = $ige_($sizenn($numtype_addrtype(I64_Inn)), v_sx, i_1, i_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $feq_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fne_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $flt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fgt_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fle_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn), mk_num__1_num_(F32_Fnn, f_1), mk_num__1_num_(F32_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F32_Fnn)), f_1, f_2) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_relop_{f_1 : fN, f_2 : fN}(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn), mk_num__1_num_(F64_Fnn, f_1), mk_num__1_num_(F64_Fnn, f_2)) = $fge_($sizenn($numtype_Fnn(F64_Fnn)), f_1, f_2) + +;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec +def $fun_cvtop__(numtype_1 : numtype, numtype_2 : numtype, v_cvtop__ : cvtop__, v_num_ : num_) : num_* + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(v_sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, EXTEND_cvtop__Inn_1_Inn_2(v_sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(v_sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(v_sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $extend__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I32_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I32_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I64_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I64_Inn, WRAP_cvtop__Inn_1_Inn_2), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))] + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, $wrap__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_addrtype(I64_Inn)), i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#66)*{iter_0#66 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#65)))*{iter_0#65 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#68)*{iter_0#68 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#67)))*{iter_0#67 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#70)*{iter_0#70 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#69)))*{iter_0#69 <- lift($trunc__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#72)*{iter_0#72 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#71)))*{iter_0#71 <- lift($trunc__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#74)*{iter_0#74 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#73)))*{iter_0#73 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I32_Inn, iter_0#76)*{iter_0#76 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, iter_0#75)))*{iter_0#75 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I32_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#78)*{iter_0#78 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#77)))*{iter_0#77 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(v_sx)), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__0_num_(I64_Inn, iter_0#80)*{iter_0#80 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + -- (wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, iter_0#79)))*{iter_0#79 <- lift($trunc_sat__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_addrtype(I64_Inn)), v_sx, f_1))} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(v_sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(v_sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F32_Fnn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(v_sx)), mk_num__0_num_(I32_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I32_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{v_sx : sx, i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(v_sx)), mk_num__0_num_(I64_Inn, i_1)) = [mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), v_sx, i_1))] + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, $convert__($sizenn1($numtype_addrtype(I64_Inn)), $sizenn2($numtype_Fnn(F64_Fnn)), v_sx, i_1))) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#82)*{iter_0#82 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#81)))*{iter_0#81 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#84)*{iter_0#84 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#83)))*{iter_0#83 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#86)*{iter_0#86 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#85)))*{iter_0#85 <- $promote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#88)*{iter_0#88 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#87)))*{iter_0#87 <- $promote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#90)*{iter_0#90 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#89)))*{iter_0#89 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F32_Fnn, iter_0#92)*{iter_0#92 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#91)))*{iter_0#91 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F32_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F32_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#94)*{iter_0#94 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#93)))*{iter_0#93 <- $demote__($sizenn1($numtype_Fnn(F32_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F64_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2), mk_num__1_num_(F64_Fnn, f_1)) = mk_num__1_num_(F64_Fnn, iter_0#96)*{iter_0#96 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + -- (wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#95)))*{iter_0#95 <- $demote__($sizenn1($numtype_Fnn(F64_Fnn)), $sizenn2($numtype_Fnn(F64_Fnn)), f_1)} + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I32_numtype, F32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I64_numtype, F32_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F32_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F32_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I32_numtype, F64_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I32_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I32_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I32_Inn, i_1))] + -- if ($size($numtype_addrtype(I32_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{i_1 : uN}(I64_numtype, F64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2), mk_num__0_num_(I64_Inn, i_1)) = [$reinterpret__($numtype_addrtype(I64_Inn), $numtype_Fnn(F64_Fnn), mk_num__0_num_(I64_Inn, i_1))] + -- if ($size($numtype_addrtype(I64_Inn)) = $size($numtype_Fnn(F64_Fnn))) + -- wf_num_: `%%`($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, i_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, I32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, I32_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I32_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I32_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F32_numtype, I64_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F32_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F32_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F32_Fnn, f_1))] + -- if ($size($numtype_Fnn(F32_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, f_1)) + ;; ../../../../specification/wasm-3.0/3.1-numerics.scalar.spectec + def $fun_cvtop__{f_1 : fN}(F64_numtype, I64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2), mk_num__1_num_(F64_Fnn, f_1)) = [$reinterpret__($numtype_Fnn(F64_Fnn), $numtype_addrtype(I64_Inn), mk_num__1_num_(F64_Fnn, f_1))] + -- if ($size($numtype_Fnn(F64_Fnn)) = $size($numtype_addrtype(I64_Inn))) + -- wf_num_: `%%`($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, f_1)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lanes_(v_shape : shape, v_vec_ : vec_) : lane_* + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $inv_lanes_(v_shape : shape, var_0 : lane_*) : vec_ + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $zeroop(shape_1 : shape, shape_2 : shape, v_vcvtop__ : vcvtop__) : zero? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = zero_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?(v_zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?(v_zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?(v_zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?(v_zero) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $zeroop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?() + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $halfop(shape_1 : shape, shape_2 : shape, v_vcvtop__ : vcvtop__) : half? + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx))) = ?(v_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx))) = half_opt + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I8_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I16_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim, v_zero : zero}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(v_zero))) = ?() + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $halfop{M_1 : dim, M_2 : dim}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) = ?(LOW_half) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_half(v_half : half, nat : nat, nat_0 : nat) : nat + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_half{i : nat, j : nat}(LOW_half, i, j) = i + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_half{i : nat, j : nat}(HIGH_half, i, j) = j + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $iswizzle_lane_(v_N : N, var_0 : iN*, v_iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $iswizzle_lane_{v_N : nat, c_lst : iN*, i : uN}(v_N, c_lst, i) = (if ($proj_uN_0(i).0 < |c_lst|) then c_lst[$proj_uN_0(i).0] else `%`_iN(0,)) + -- wf_uN: `%%`(v_N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $irelaxed_swizzle_lane_(v_N : N, var_0 : iN*, v_iN : iN) : iN + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $irelaxed_swizzle_lane_{v_N : nat, c_lst : iN*, i : uN}(v_N, c_lst, i) = (if ($proj_uN_0(i).0 < |c_lst|) then c_lst[$proj_uN_0(i).0] else (if ($signed_(v_N, $proj_uN_0(i).0) < (0 : nat <:> int)) then `%`_iN(0,) else $fun_relaxed2($R_swizzle, syntax iN, `%`_iN(0,), c_lst[($proj_uN_0(i).0 \ |c_lst|)]))) + -- wf_uN: `%%`(v_N, `%`_uN(0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivunop_(v_shape : shape, def $f_(v_N : N, v_iN : iN) : iN, v_vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{v_M : dim, def $f_(v_N : N, v_iN : iN) : iN, v_1 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#5)*{c#5 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#2)))*{c_1#2 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#4)))*{c#4 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{v_M : dim, def $f_(v_N : N, v_iN : iN) : iN, v_1 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#8)*{c#8 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#4)))*{c_1#4 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#7)))*{c#7 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{v_M : dim, def $f_(v_N : N, v_iN : iN) : iN, v_1 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#11)*{c#11 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#6)))*{c_1#6 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#10)))*{c#10 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivunop_{v_M : dim, def $f_(v_N : N, v_iN : iN) : iN, v_1 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#14)*{c#14 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#8)))*{c_1#8 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#13)))*{c#13 <- c_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvunop_(v_shape : shape, def $f_(v_N : N, v_fN : fN) : fN*, v_vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{v_M : dim, def $f_(v_N : N, v_fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F32_lanetype, v_M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#17)))*{c#17 <- c_lst#3})*{c_lst#3 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_1) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#97))*{iter_0#97 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#10)))))}*{c_1#10 <- c_1_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#16)))))*{c#16 <- c_lst#2}*{c_lst#2 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#98))))*{iter_0#98 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#11)))))}*{c_1#11 <- c_1_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvunop_{v_M : dim, def $f_(v_N : N, v_fN : fN) : fN*, v_1 : uN}(`%X%`_shape(F64_lanetype, v_M), def $f_, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#20)))*{c#20 <- c_lst#6})*{c_lst#6 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_1) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#99))*{iter_0#99 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#13)))))}*{c_1#13 <- c_1_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#19)))))*{c#19 <- c_lst#5}*{c_lst#5 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#100))))*{iter_0#100 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#14)))))}*{c_1#14 <- c_1_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinop_(v_shape : shape, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#23)*{c#23 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#16)), !($proj_lane__2(c_2#2)))*{c_1#16 <- c_1_lst, c_2#2 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#22)))*{c#22 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#26)*{c#26 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#18)), !($proj_lane__2(c_2#4)))*{c_1#18 <- c_1_lst, c_2#4 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#25)))*{c#25 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#29)*{c#29 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#20)), !($proj_lane__2(c_2#6)))*{c_1#20 <- c_1_lst, c_2#6 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#28)))*{c#28 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#32)*{c#32 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#22)), !($proj_lane__2(c_2#8)))*{c_1#22 <- c_1_lst, c_2#8 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#31)))*{c#31 <- c_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsx_(v_shape : shape, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#35)*{c#35 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#24)), !($proj_lane__2(c_2#10)))*{c_1#24 <- c_1_lst, c_2#10 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#34)))*{c#34 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#38)*{c#38 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#26)), !($proj_lane__2(c_2#12)))*{c_1#26 <- c_1_lst, c_2#12 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#37)))*{c#37 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#41)*{c#41 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#28)), !($proj_lane__2(c_2#14)))*{c_1#28 <- c_1_lst, c_2#14 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#40)))*{c#40 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_sx, v_1, v_2) = [$inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#44)*{c#44 <- c_lst})] + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#30)), !($proj_lane__2(c_2#16)))*{c_1#30 <- c_1_lst, c_2#16 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#43)))*{c#43 <- c_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbinopsxnd_(v_shape : shape, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN*, v_sx : sx, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN*, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#47)))*{c#47 <- c_lst#9})*{c_lst#9 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#101)*{iter_0#101 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#32)), !($proj_lane__2(c_2#18)))}*{c_1#32 <- c_1_lst, c_2#18 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#46)))))*{c#46 <- c_lst#8}*{c_lst#8 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#102)))*{iter_0#102 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#33)), !($proj_lane__2(c_2#19)))}*{c_1#33 <- c_1_lst, c_2#19 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN*, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#50)))*{c#50 <- c_lst#12})*{c_lst#12 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#103)*{iter_0#103 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#35)), !($proj_lane__2(c_2#21)))}*{c_1#35 <- c_1_lst, c_2#21 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#49)))))*{c#49 <- c_lst#11}*{c_lst#11 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#104)))*{iter_0#104 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#36)), !($proj_lane__2(c_2#22)))}*{c_1#36 <- c_1_lst, c_2#22 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN*, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#53)))*{c#53 <- c_lst#15})*{c_lst#15 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#105)*{iter_0#105 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#38)), !($proj_lane__2(c_2#24)))}*{c_1#38 <- c_1_lst, c_2#24 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#52)))))*{c#52 <- c_lst#14}*{c_lst#14 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#106)))*{iter_0#106 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#39)), !($proj_lane__2(c_2#25)))}*{c_1#39 <- c_1_lst, c_2#25 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbinopsxnd_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN*, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#56)))*{c#56 <- c_lst#18})*{c_lst#18 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#107)*{iter_0#107 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#41)), !($proj_lane__2(c_2#27)))}*{c_1#41 <- c_1_lst, c_2#27 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#55)))))*{c#55 <- c_lst#17}*{c_lst#17 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#108)))*{iter_0#108 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#42)), !($proj_lane__2(c_2#28)))}*{c_1#42 <- c_1_lst, c_2#28 <- c_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvbinop_(v_shape : shape, def $f_(v_N : N, v_fN : fN, v_fN : fN) : fN*, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#59)))*{c#59 <- c_lst#21})*{c_lst#21 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#109))*{iter_0#109 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#44)))), !($proj_num__1(!($proj_lane__0(c_2#30)))))}*{c_1#44 <- c_1_lst, c_2#30 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#58)))))*{c#58 <- c_lst#20}*{c_lst#20 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#110))))*{iter_0#110 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#45)))), !($proj_num__1(!($proj_lane__0(c_2#31)))))}*{c_1#45 <- c_1_lst, c_2#31 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvbinop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN) : fN*, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#62)))*{c#62 <- c_lst#24})*{c_lst#24 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_2) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#111))*{iter_0#111 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#47)))), !($proj_num__1(!($proj_lane__0(c_2#33)))))}*{c_1#47 <- c_1_lst, c_2#33 <- c_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#61)))))*{c#61 <- c_lst#23}*{c_lst#23 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#112))))*{iter_0#112 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#48)))), !($proj_num__1(!($proj_lane__0(c_2#34)))))}*{c_1#48 <- c_1_lst, c_2#34 <- c_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivternopnd_(v_shape : shape, def $f_(v_N : N, v_iN : iN, v_iN : iN, v_iN : iN) : iN*, v_vec_ : vec_, v_vec__0 : vec_, v_vec__1 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN, v_iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#65)))*{c#65 <- c_lst#27})*{c_lst#27 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I32_Jnn, iter_0#113)*{iter_0#113 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#50)), !($proj_lane__2(c_2#36)), !($proj_lane__2(c_3#2)))}*{c_1#50 <- c_1_lst, c_2#36 <- c_2_lst, c_3#2 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, !($proj_lane__2(c#64)))))*{c#64 <- c_lst#26}*{c_lst#26 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I32_Jnn), mk_lane__2_lane_(I32_Jnn, iter_0#114)))*{iter_0#114 <- $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#51)), !($proj_lane__2(c_2#37)), !($proj_lane__2(c_3#3)))}*{c_1#51 <- c_1_lst, c_2#37 <- c_2_lst, c_3#3 <- c_3_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN, v_iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#68)))*{c#68 <- c_lst#30})*{c_lst#30 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I64_Jnn, iter_0#115)*{iter_0#115 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#53)), !($proj_lane__2(c_2#39)), !($proj_lane__2(c_3#5)))}*{c_1#53 <- c_1_lst, c_2#39 <- c_2_lst, c_3#5 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, !($proj_lane__2(c#67)))))*{c#67 <- c_lst#29}*{c_lst#29 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I64_Jnn), mk_lane__2_lane_(I64_Jnn, iter_0#116)))*{iter_0#116 <- $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#54)), !($proj_lane__2(c_2#40)), !($proj_lane__2(c_3#6)))}*{c_1#54 <- c_1_lst, c_2#40 <- c_2_lst, c_3#6 <- c_3_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN, v_iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#71)))*{c#71 <- c_lst#33})*{c_lst#33 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I8_Jnn, iter_0#117)*{iter_0#117 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#56)), !($proj_lane__2(c_2#42)), !($proj_lane__2(c_3#8)))}*{c_1#56 <- c_1_lst, c_2#42 <- c_2_lst, c_3#8 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, !($proj_lane__2(c#70)))))*{c#70 <- c_lst#32}*{c_lst#32 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I8_Jnn), mk_lane__2_lane_(I8_Jnn, iter_0#118)))*{iter_0#118 <- $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#57)), !($proj_lane__2(c_2#43)), !($proj_lane__2(c_3#9)))}*{c_1#57 <- c_1_lst, c_2#43 <- c_2_lst, c_3#9 <- c_3_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivternopnd_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN, v_iN : iN) : iN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#74)))*{c#74 <- c_lst#36})*{c_lst#36 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__2_lane_(I16_Jnn, iter_0#119)*{iter_0#119 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#59)), !($proj_lane__2(c_2#45)), !($proj_lane__2(c_3#11)))}*{c_1#59 <- c_1_lst, c_2#45 <- c_2_lst, c_3#11 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, !($proj_lane__2(c#73)))))*{c#73 <- c_lst#35}*{c_lst#35 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Jnn(I16_Jnn), mk_lane__2_lane_(I16_Jnn, iter_0#120)))*{iter_0#120 <- $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#60)), !($proj_lane__2(c_2#46)), !($proj_lane__2(c_3#12)))}*{c_1#60 <- c_1_lst, c_2#46 <- c_2_lst, c_3#12 <- c_3_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvternop_(v_shape : shape, def $f_(v_N : N, v_fN : fN, v_fN : fN, v_fN : fN) : fN*, v_vec_ : vec_, v_vec__0 : vec_, v_vec__1 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN, v_fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#77)))*{c#77 <- c_lst#39})*{c_lst#39 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#121))*{iter_0#121 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#62)))), !($proj_num__1(!($proj_lane__0(c_2#48)))), !($proj_num__1(!($proj_lane__0(c_3#14)))))}*{c_1#62 <- c_1_lst, c_2#48 <- c_2_lst, c_3#14 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), !($proj_lane__0(c#76)))))*{c#76 <- c_lst#38}*{c_lst#38 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F32_Fnn), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, iter_0#122))))*{iter_0#122 <- $f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#63)))), !($proj_num__1(!($proj_lane__0(c_2#49)))), !($proj_num__1(!($proj_lane__0(c_3#15)))))}*{c_1#63 <- c_1_lst, c_2#49 <- c_2_lst, c_3#15 <- c_3_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvternop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN, v_fN : fN) : fN*, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, v_M), def $f_, v_1, v_2, v_3) = $inv_lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#80)))*{c#80 <- c_lst#42})*{c_lst#42 <- c_lst_lst} + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_2) + -- let{c_3_lst : lane_*} c_3_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_3) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#123))*{iter_0#123 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#65)))), !($proj_num__1(!($proj_lane__0(c_2#51)))), !($proj_num__1(!($proj_lane__0(c_3#17)))))}*{c_1#65 <- c_1_lst, c_2#51 <- c_2_lst, c_3#17 <- c_3_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), !($proj_lane__0(c#79)))))*{c#79 <- c_lst#41}*{c_lst#41 <- c_lst_lst} + -- (wf_lane_: `%%`($lanetype_Fnn(F64_Fnn), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, iter_0#124))))*{iter_0#124 <- $f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#66)))), !($proj_num__1(!($proj_lane__0(c_2#52)))), !($proj_num__1(!($proj_lane__0(c_3#18)))))}*{c_1#66 <- c_1_lst, c_2#52 <- c_2_lst, c_3#18 <- c_3_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelop_(v_shape : shape, def $f_(v_N : N, v_iN : iN, v_iN : iN) : u32, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#83)*{c#83 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#68)), !($proj_lane__2(c_2#54)))).0,))*{c_1#68 <- c_1_lst, c_2#54 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#82)))*{c#82 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#69)), !($proj_lane__2(c_2#55)))).0,)))*{c_1#69 <- c_1_lst, c_2#55 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#86)*{c#86 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#71)), !($proj_lane__2(c_2#57)))).0,))*{c_1#71 <- c_1_lst, c_2#57 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#85)))*{c#85 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#72)), !($proj_lane__2(c_2#58)))).0,)))*{c_1#72 <- c_1_lst, c_2#58 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#89)*{c#89 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#74)), !($proj_lane__2(c_2#60)))).0,))*{c_1#74 <- c_1_lst, c_2#60 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#88)))*{c#88 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#75)), !($proj_lane__2(c_2#61)))).0,)))*{c_1#75 <- c_1_lst, c_2#61 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : u32, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#92)*{c#92 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#77)), !($proj_lane__2(c_2#63)))).0,))*{c_1#77 <- c_1_lst, c_2#63 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#91)))*{c#91 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#78)), !($proj_lane__2(c_2#64)))).0,)))*{c_1#78 <- c_1_lst, c_2#64 <- c_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelopsx_(v_shape : shape, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : u32, v_sx : sx, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : u32, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#95)*{c#95 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#80)), !($proj_lane__2(c_2#66)))).0,))*{c_1#80 <- c_1_lst, c_2#66 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#94)))*{c#94 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#81)), !($proj_lane__2(c_2#67)))).0,)))*{c_1#81 <- c_1_lst, c_2#67 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : u32, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#98)*{c#98 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#83)), !($proj_lane__2(c_2#69)))).0,))*{c_1#83 <- c_1_lst, c_2#69 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#97)))*{c#97 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#84)), !($proj_lane__2(c_2#70)))).0,)))*{c_1#84 <- c_1_lst, c_2#70 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : u32, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#101)*{c#101 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#86)), !($proj_lane__2(c_2#72)))).0,))*{c_1#86 <- c_1_lst, c_2#72 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#100)))*{c#100 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#87)), !($proj_lane__2(c_2#73)))).0,)))*{c_1#87 <- c_1_lst, c_2#73 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : u32, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_sx, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#104)*{c#104 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, `%`_iN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#89)), !($proj_lane__2(c_2#75)))).0,))*{c_1#89 <- c_1_lst, c_2#75 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#103)))*{c#103 <- c_lst} + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#90)), !($proj_lane__2(c_2#76)))).0,)))*{c_1#90 <- c_1_lst, c_2#76 <- c_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fvrelop_(v_shape : shape, def $f_(v_N : N, v_fN : fN, v_fN : fN) : u32, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN) : u32, v_1 : uN, v_2 : uN, v_Inn : addrtype}(`%X%`_shape(F32_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(v_Inn), v_M), mk_lane__0_lane_($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, `%`_uN($proj_uN_0(c#107).0,)))*{c#107 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $sizenn($numtype_Fnn(F32_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#92)))), !($proj_num__1(!($proj_lane__0(c_2#78)))))).0,))*{c_1#92 <- c_1_lst, c_2#78 <- c_2_lst} + -- if ($isize(v_Inn) = $fsize(F32_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(v_Inn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(v_Inn), v_M)), mk_lane__0_lane_($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, `%`_uN($proj_uN_0(c#106).0,)))))*{c#106 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F32_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#93)))), !($proj_num__1(!($proj_lane__0(c_2#79)))))).0,)))*{c_1#93 <- c_1_lst, c_2#79 <- c_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fvrelop_{v_M : dim, def $f_(v_N : N, v_fN : fN, v_fN : fN) : u32, v_1 : uN, v_2 : uN, v_Inn : addrtype}(`%X%`_shape(F64_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_addrtype(v_Inn), v_M), mk_lane__0_lane_($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, `%`_uN($proj_uN_0(c#110).0,)))*{c#110 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $extend__(1, $sizenn($numtype_Fnn(F64_Fnn)), S_sx, `%`_iN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#95)))), !($proj_num__1(!($proj_lane__0(c_2#81)))))).0,))*{c_1#95 <- c_1_lst, c_2#81 <- c_2_lst} + -- if ($isize(v_Inn) = $fsize(F64_Fnn)) + -- wf_shape: `%`(`%X%`_shape($lanetype_addrtype(v_Inn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(v_Inn), v_M)), mk_lane__0_lane_($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, `%`_uN($proj_uN_0(c#109).0,)))))*{c#109 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + -- (wf_uN: `%%`(1, `%`_uN($proj_uN_0($f_($sizenn($numtype_Fnn(F64_Fnn)), !($proj_num__1(!($proj_lane__0(c_1#96)))), !($proj_num__1(!($proj_lane__0(c_2#82)))))).0,)))*{c_1#96 <- c_1_lst, c_2#82 <- c_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftop_(v_shape : shape, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_vec_ : vec_, v_u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#113)*{c#113 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#98)), `%`_iN($proj_uN_0(i).0,))*{c_1#98 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#112)))*{c#112 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#116)*{c#116 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#100)), `%`_iN($proj_uN_0(i).0,))*{c_1#100 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#115)))*{c#115 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#119)*{c#119 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#102)), `%`_iN($proj_uN_0(i).0,))*{c_1#102 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#118)))*{c#118 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftop_{v_M : dim, def $f_(v_N : N, v_iN : iN, v_iN : iN) : iN, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#122)*{c#122 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#104)), `%`_iN($proj_uN_0(i).0,))*{c_1#104 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#121)))*{c#121 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshiftopsx_(v_shape : shape, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_vec_ : vec_, v_u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#125)*{c#125 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#106)), `%`_iN($proj_uN_0(i).0,))*{c_1#106 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#124)))*{c#124 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I32_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#128)*{c#128 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#108)), `%`_iN($proj_uN_0(i).0,))*{c_1#108 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#127)))*{c#127 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I64_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#131)*{c#131 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#110)), `%`_iN($proj_uN_0(i).0,))*{c_1#110 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#130)))*{c#130 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I8_Jnn)), `%`_uN($proj_uN_0(i).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshiftopsx_{v_M : dim, def $f_(v_N : N, v_sx : sx, v_iN : iN, v_iN : iN) : iN, v_sx : sx, v_1 : uN, i : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_sx, v_1, i) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#134)*{c#134 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#112)), `%`_iN($proj_uN_0(i).0,))*{c_1#112 <- c_1_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#133)))*{c#133 <- c_lst} + -- wf_uN: `%%`($lsize($lanetype_Jnn(I16_Jnn)), `%`_uN($proj_uN_0(i).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivbitmaskop_(v_shape : shape, v_vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{v_M : dim, v_1 : uN, c : uN}(`%X%`_shape(I32_lanetype, v_M), v_1) = $irev_(32, c) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#114)), `%`_iN(0,))).0,)*{c_1#114 <- c_1_lst} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(v_M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I32_Jnn)), S_sx, !($proj_lane__2(c_1#115)), `%`_iN(0,))).0,),))*{c_1#115 <- c_1_lst} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{v_M : dim, v_1 : uN, c : uN}(`%X%`_shape(I64_lanetype, v_M), v_1) = $irev_(32, c) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#117)), `%`_iN(0,))).0,)*{c_1#117 <- c_1_lst} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(v_M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I64_Jnn)), S_sx, !($proj_lane__2(c_1#118)), `%`_iN(0,))).0,),))*{c_1#118 <- c_1_lst} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{v_M : dim, v_1 : uN, c : uN}(`%X%`_shape(I8_lanetype, v_M), v_1) = $irev_(32, c) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#120)), `%`_iN(0,))).0,)*{c_1#120 <- c_1_lst} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(v_M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I8_Jnn)), S_sx, !($proj_lane__2(c_1#121)), `%`_iN(0,))).0,),))*{c_1#121 <- c_1_lst} + -- wf_bit: `%`(`%`_bit(0,),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivbitmaskop_{v_M : dim, v_1 : uN, c : uN}(`%X%`_shape(I16_lanetype, v_M), v_1) = $irev_(32, c) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- if ($ibits_(32, c) = `%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#123)), `%`_iN(0,))).0,)*{c_1#123 <- c_1_lst} ++ `%`_bit(0,)^(((32 : nat <:> int) - ($proj_dim_0(v_M).0 : nat <:> int)) : int <:> nat){}) + -- wf_uN: `%%`(32, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_bit: `%`(`%`_bit($proj_uN_0($ilt_($lsizenn($lanetype_Jnn(I16_Jnn)), S_sx, !($proj_lane__2(c_1#124)), `%`_iN(0,))).0,),))*{c_1#124 <- c_1_lst} + -- wf_bit: `%`(`%`_bit(0,),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivswizzlop_(v_shape : shape, def $f_(v_N : N, iN*, v_iN : iN) : iN, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{v_M : dim, def $f_(v_N : N, iN*, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), mk_lane__2_lane_(I32_Jnn, c#137)*{c#137 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I32_Jnn)), !($proj_lane__2(c_1#126))*{c_1#126 <- c_1_lst}, !($proj_lane__2(c_2#84)))*{c_2#84 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M)), mk_lane__2_lane_(I32_Jnn, c#136)))*{c#136 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{v_M : dim, def $f_(v_N : N, iN*, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), mk_lane__2_lane_(I64_Jnn, c#140)*{c#140 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I64_Jnn)), !($proj_lane__2(c_1#128))*{c_1#128 <- c_1_lst}, !($proj_lane__2(c_2#86)))*{c_2#86 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M)), mk_lane__2_lane_(I64_Jnn, c#139)))*{c#139 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{v_M : dim, def $f_(v_N : N, iN*, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), mk_lane__2_lane_(I8_Jnn, c#143)*{c#143 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I8_Jnn)), !($proj_lane__2(c_1#130))*{c_1#130 <- c_1_lst}, !($proj_lane__2(c_2#88)))*{c_2#88 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M)), mk_lane__2_lane_(I8_Jnn, c#142)))*{c#142 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivswizzlop_{v_M : dim, def $f_(v_N : N, iN*, v_iN : iN) : iN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), def $f_, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), mk_lane__2_lane_(I16_Jnn, c#146)*{c#146 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : iN*} c_lst = $f_($lsizenn($lanetype_Jnn(I16_Jnn)), !($proj_lane__2(c_1#132))*{c_1#132 <- c_1_lst}, !($proj_lane__2(c_2#90)))*{c_2#90 <- c_2_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M)), mk_lane__2_lane_(I16_Jnn, c#145)))*{c#145 <- c_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivshufflop_(v_shape : shape, var_0 : laneidx*, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{v_M : dim, i_lst : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), i_lst, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), c_lst) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v_2) + -- let{c_lst : lane_*} c_lst = c_1_lst ++ c_2_lst[$proj_uN_0(i#93311).0]*{i#93311 <- i_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{v_M : dim, i_lst : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), i_lst, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), c_lst) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v_2) + -- let{c_lst : lane_*} c_lst = c_1_lst ++ c_2_lst[$proj_uN_0(i#93314).0]*{i#93314 <- i_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{v_M : dim, i_lst : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), i_lst, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), c_lst) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v_2) + -- let{c_lst : lane_*} c_lst = c_1_lst ++ c_2_lst[$proj_uN_0(i#93317).0]*{i#93317 <- i_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivshufflop_{v_M : dim, i_lst : laneidx*, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), i_lst, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), c_lst) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v_2) + -- let{c_lst : lane_*} c_lst = c_1_lst ++ c_2_lst[$proj_uN_0(i#93320).0]*{i#93320 <- i_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvunop_(v_vectype : vectype, v_vvunop : vvunop, v_vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvunop_{v_Vnn : vectype, v : uN}(v_Vnn, NOT_vvunop, v) = [$inot_($vsizenn(v_Vnn), v)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvbinop_(v_vectype : vectype, v_vvbinop : vvbinop, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{v_Vnn : vectype, v_1 : uN, v_2 : uN}(v_Vnn, AND_vvbinop, v_1, v_2) = [$iand_($vsizenn(v_Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{v_Vnn : vectype, v_1 : uN, v_2 : uN}(v_Vnn, ANDNOT_vvbinop, v_1, v_2) = [$iandnot_($vsizenn(v_Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{v_Vnn : vectype, v_1 : uN, v_2 : uN}(v_Vnn, OR_vvbinop, v_1, v_2) = [$ior_($vsizenn(v_Vnn), v_1, v_2)] + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvbinop_{v_Vnn : vectype, v_1 : uN, v_2 : uN}(v_Vnn, XOR_vvbinop, v_1, v_2) = [$ixor_($vsizenn(v_Vnn), v_1, v_2)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vvternop_(v_vectype : vectype, v_vvternop : vvternop, v_vec_ : vec_, v_vec__0 : vec_, v_vec__1 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vvternop_{v_Vnn : vectype, v_1 : uN, v_2 : uN, v_3 : uN}(v_Vnn, BITSELECT_vvternop, v_1, v_2, v_3) = [$ibitselect_($vsizenn(v_Vnn), v_1, v_2, v_3)] + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vunop_(v_shape : shape, v_vunop_ : vunop_, v_vec_ : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, ABS_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, NEG_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fneg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, SQRT_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fsqrt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, CEIL_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fceil_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, FLOOR_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $ffloor_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, TRUNC_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $ftrunc_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vunop__1_vunop_(F32_Fnn, v_M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vunop__1_vunop_(F64_Fnn, v_M, NEAREST_vunop_Fnn_M), v) = $fvunop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fnearest_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vunop__0_vunop_(I32_Jnn, v_M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vunop__0_vunop_(I64_Jnn, v_M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vunop__0_vunop_(I8_Jnn, v_M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vunop__0_vunop_(I16_Jnn, v_M, ABS_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $iabs_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vunop__0_vunop_(I32_Jnn, v_M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vunop__0_vunop_(I64_Jnn, v_M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vunop__0_vunop_(I8_Jnn, v_M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vunop__0_vunop_(I16_Jnn, v_M, NEG_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ineg_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vunop__0_vunop_(I32_Jnn, v_M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vunop__0_vunop_(I64_Jnn, v_M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vunop__0_vunop_(I8_Jnn, v_M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vunop_{v_M : dim, v : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vunop__0_vunop_(I16_Jnn, v_M, POPCNT_vunop_Jnn_M), v) = $ivunop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ipopcnt_, v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vbinop_(v_shape : shape, v_vbinop_ : vbinop_, v_vec_ : vec_, v_vec__0 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, ADD_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $iadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, SUB_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $isub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, MUL_vbinop_Jnn_M), v_1, v_2) = $ivbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $imul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, ADD_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $iadd_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, ADD_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $iadd_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, ADD_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $iadd_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, ADD_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $iadd_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, SUB_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $isub_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, SUB_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $isub_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, SUB_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $isub_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, SUB_SAT_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $isub_sat_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, MIN_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $imin_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, MIN_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $imin_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, MIN_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $imin_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, MIN_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $imin_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, MAX_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $imax_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, MAX_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $imax_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, MAX_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $imax_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, MAX_vbinop_Jnn_M(v_sx)), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $imax_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, AVGRU_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $iavgr_, U_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, Q15MULR_SATS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $iq15mulr_sat_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vbinop__0_vbinop_(I32_Jnn, v_M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vbinop__0_vbinop_(I64_Jnn, v_M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vbinop__0_vbinop_(I8_Jnn, v_M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vbinop__0_vbinop_(I16_Jnn, v_M, RELAXED_Q15MULRS_vbinop_Jnn_M), v_1, v_2) = $ivbinopsxnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $irelaxed_q15mulr_, S_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, ADD_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fadd_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, SUB_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fsub_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, MUL_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fmul_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, DIV_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fdiv_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, PMIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fpmin_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, PMAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fpmax_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, RELAXED_MIN_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $frelaxed_min_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vbinop__1_vbinop_(F32_Fnn, v_M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vbinop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vbinop__1_vbinop_(F64_Fnn, v_M, RELAXED_MAX_vbinop_Fnn_M), v_1, v_2) = $fvbinop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $frelaxed_max_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vternop_(v_shape : shape, v_vternop_ : vternop_, v_vec_ : vec_, v_vec__0 : vec_, v_vec__1 : vec_) : vec_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vternop__0_vternop_(I32_Jnn, v_M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vternop__0_vternop_(I64_Jnn, v_M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vternop__0_vternop_(I8_Jnn, v_M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vternop__0_vternop_(I16_Jnn, v_M, RELAXED_LANESELECT_vternop_Jnn_M), v_1, v_2, v_3) = $ivternopnd_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $irelaxed_laneselect_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vternop__1_vternop_(F32_Fnn, v_M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vternop__1_vternop_(F64_Fnn, v_M, RELAXED_MADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $frelaxed_madd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vternop__1_vternop_(F32_Fnn, v_M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vternop_{v_M : dim, v_1 : uN, v_2 : uN, v_3 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vternop__1_vternop_(F64_Fnn, v_M, RELAXED_NMADD_vternop_Fnn_M), v_1, v_2, v_3) = $fvternop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $frelaxed_nmadd_, v_1, v_2, v_3) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vrelop_(v_shape : shape, v_vrelop_ : vrelop_, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, EQ_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ieq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, NE_vrelop_Jnn_M), v_1, v_2) = $ivrelop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ine_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, LT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ilt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, LT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ilt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, LT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ilt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, LT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ilt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, GT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $igt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, GT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $igt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, GT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $igt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, GT_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $igt_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, LE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ile_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, LE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ile_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, LE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ile_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, LE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ile_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, v_M), mk_vrelop__0_vrelop_(I32_Jnn, v_M, GE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ige_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, v_M), mk_vrelop__0_vrelop_(I64_Jnn, v_M, GE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ige_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, v_M), mk_vrelop__0_vrelop_(I8_Jnn, v_M, GE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ige_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, v_M), mk_vrelop__0_vrelop_(I16_Jnn, v_M, GE_vrelop_Jnn_M(v_sx,)), v_1, v_2) = $ivrelopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ige_, v_sx, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, EQ_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $feq_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, NE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fne_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, LT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $flt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, GT_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fgt_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, LE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fle_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F32_lanetype, v_M), mk_vrelop__1_vrelop_(F32_Fnn, v_M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F32_Fnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vrelop_{v_M : dim, v_1 : uN, v_2 : uN}(`%X%`_shape(F64_lanetype, v_M), mk_vrelop__1_vrelop_(F64_Fnn, v_M, GE_vrelop_Fnn_M), v_1, v_2) = $fvrelop_(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M), def $fge_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Fnn(F64_Fnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $lcvtop__(shape_1 : shape, shape_2 : shape, v_vcvtop__ : vcvtop__, v_lane_ : lane_) : lane_* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I32_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I64_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I8_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), mk_vcvtop___0_vcvtop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__2_lane_(I16_Jnn, c)] + -- let{c : iN} c = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F32_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I32_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I32_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I64_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I64_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I8_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I8_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, half_opt : half?, v_sx : sx, c_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___1_vcvtop__(I16_Jnn, M_1, F64_Fnn, M_2, CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(half_opt, v_sx)), mk_lane__2_lane_(I16_Jnn, c_1)) = [mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))] + -- let{c : fN} c = $convert__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), v_sx, c_1) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c))) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#157))?{c#157 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#156))))?{c#156 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#160))?{c#160 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#159))))?{c#159 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#163))?{c#163 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#162))))?{c#162 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#166))?{c#166 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#165))))?{c#165 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#169))?{c#169 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#168))))?{c#168 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#172))?{c#172 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#171))))?{c#171 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#175))?{c#175 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#174))))?{c#174 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#178))?{c#178 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#177))))?{c#177 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#181))?{c#181 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#180))))?{c#180 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#184))?{c#184 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#183))))?{c#183 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#187))?{c#187 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#186))))?{c#186 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#190))?{c#190 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#189))))?{c#189 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#193))?{c#193 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#192))))?{c#192 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#196))?{c#196 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#195))))?{c#195 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#199))?{c#199 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#198))))?{c#198 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#202))?{c#202 <- c_opt}) + -- let{c_opt : iN?} c_opt = $trunc_sat__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#201))))?{c#201 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#205))?{c#205 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#204))))?{c#204 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#208))?{c#208 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#207))))?{c#207 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#211))?{c#211 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#210))))?{c#210 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#214))?{c#214 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#213))))?{c#213 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#217))?{c#217 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#216))))?{c#216 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#220))?{c#220 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#219))))?{c#219 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#223))?{c#223 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#222))))?{c#222 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F32_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#226))?{c#226 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#225))))?{c#225 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#229))?{c#229 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#228))))?{c#228 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#232))?{c#232 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#231))))?{c#231 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#235))?{c#235 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#234))))?{c#234 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I32_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#238))?{c#238 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I32_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I32_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I32_Inn), mk_num__0_num_(I32_Inn, c#237))))?{c#237 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#241))?{c#241 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#240))))?{c#240 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#244))?{c#244 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#243))))?{c#243 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#247))?{c#247 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#246))))?{c#246 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, v_sx : sx, zero_opt : zero?, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), mk_vcvtop___2_vcvtop__(F64_Fnn, M_1, I64_Jnn, M_2, RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(v_sx, zero_opt)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = lift(mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#250))?{c#250 <- c_opt}) + -- let{c_opt : iN?} c_opt = $relaxed_trunc__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_addrtype(I64_Inn)), v_sx, c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_addrtype(I64_Inn), M_2)), mk_lane__0_lane_($numtype_addrtype(I64_Inn), mk_num__0_num_(I64_Inn, c#249))))?{c#249 <- c_opt} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#253))*{c#253 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#252))))*{c#252 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#256))*{c#256 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#255))))*{c#255 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#259))*{c#259 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#258))))*{c#258 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#262))*{c#262 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#261))))*{c#261 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#265))*{c#265 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#264))))*{c#264 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#268))*{c#268 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#267))))*{c#267 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#271))*{c#271 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#270))))*{c#270 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero)), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#274))*{c#274 <- c_lst} + -- let{c_lst : fN*} c_lst = $demote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#273))))*{c#273 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#277))*{c#277 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#276))))*{c#276 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#280))*{c#280 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#279))))*{c#279 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#283))*{c#283 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#282))))*{c#282 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F32_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F32_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F32_numtype, mk_num__1_num_(F32_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#286))*{c#286 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F32_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#285))))*{c#285 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#289))*{c#289 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#288))))*{c#288 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F32_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F32_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#292))*{c#292 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F32_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F32_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F32_Fnn), mk_num__1_num_(F32_Fnn, c#291))))*{c#291 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#295))*{c#295 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#294))))*{c#294 <- c_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $lcvtop__{M_1 : dim, M_2 : dim, c_1 : fN}(`%X%`_shape(F64_lanetype, M_1), `%X%`_shape(F64_lanetype, M_2), mk_vcvtop___3_vcvtop__(F64_Fnn, M_1, F64_Fnn, M_2, PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2), mk_lane__0_lane_(F64_numtype, mk_num__1_num_(F64_Fnn, c_1))) = mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#298))*{c#298 <- c_lst} + -- let{c_lst : fN*} c_lst = $promote__($lsizenn1($lanetype_Fnn(F64_Fnn)), $lsizenn2($lanetype_Fnn(F64_Fnn)), c_1) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Fnn(F64_Fnn), M_2)), mk_lane__0_lane_($numtype_Fnn(F64_Fnn), mk_num__1_num_(F64_Fnn, c#297))))*{c#297 <- c_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vcvtop__(shape_1 : shape, shape_2 : shape, v_vcvtop__ : vcvtop__, v_vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vcvtop__{Lnn_1 : lanetype, v_M : dim, Lnn_2 : lanetype, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, v_M), `%X%`_shape(Lnn_2, v_M), vcvtop, v_1) = v + -- if (($halfop(`%X%`_shape(Lnn_1, v_M), `%X%`_shape(Lnn_2, v_M), vcvtop) = ?()) /\ ($zeroop(`%X%`_shape(Lnn_1, v_M), `%X%`_shape(Lnn_2, v_M), vcvtop) = ?())) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape(Lnn_1, v_M), v_1) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, v_M), `%X%`_shape(Lnn_2, v_M), vcvtop, c_1#142)*{c_1#142 <- c_1_lst}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, v_M), c_lst#44)*{c_lst#44 <- c_lst_lst}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, v_M),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN, v_half : half}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($halfop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(v_half)) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1)[$fun_half(v_half, 0, $proj_dim_0(M_2).0) : $proj_dim_0(M_2).0] + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#144)*{c_1#144 <- c_1_lst}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c_lst#46)*{c_lst#46 <- c_lst_lst}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vcvtop__{Lnn_1 : lanetype, M_1 : dim, Lnn_2 : lanetype, M_2 : dim, vcvtop : vcvtop__, v_1 : uN, v : uN}(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, v_1) = v + -- if ($zeroop(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop) = ?(ZERO_zero)) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape(Lnn_1, M_1), v_1) + -- let{c_lst_lst : lane_**} c_lst_lst = $setproduct_(syntax lane_, $lcvtop__(`%X%`_shape(Lnn_1, M_1), `%X%`_shape(Lnn_2, M_2), vcvtop, c_1#146)*{c_1#146 <- c_1_lst} ++ [$fun_zero(Lnn_2)]^$proj_dim_0(M_1).0{}) + -- if (v <- $inv_lanes_(`%X%`_shape(Lnn_2, M_2), c_lst#48)*{c_lst#48 <- c_lst_lst}) + -- wf_uN: `%%`(128, v) + -- wf_shape: `%`(`%X%`_shape(Lnn_1, M_1),) + -- wf_shape: `%`(`%X%`_shape(Lnn_2, M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vshiftop_(v_ishape : ishape, v_vshiftop_ : vshiftop_, v_vec_ : vec_, v_u32 : u32) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I32_Jnn, v_M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I64_Jnn, v_M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I8_Jnn, v_M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I16_Jnn, v_M, SHL_vshiftop_Jnn_M), v, i) = $ivshiftop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ishl_, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v_sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I32_Jnn, v_M, SHR_vshiftop_Jnn_M(v_sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), def $ishr_, v_sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I32_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v_sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I64_Jnn, v_M, SHR_vshiftop_Jnn_M(v_sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), def $ishr_, v_sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I64_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v_sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I8_Jnn, v_M, SHR_vshiftop_Jnn_M(v_sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), def $ishr_, v_sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I8_Jnn))),)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vshiftop_{v_M : dim, v_sx : sx, v : uN, i : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, v_M),), mk_vshiftop__0_vshiftop_(I16_Jnn, v_M, SHR_vshiftop_Jnn_M(v_sx)), v, i) = $ivshiftopsx_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), def $ishr_, v_sx, v, `%`_u32(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + -- wf_uN: `%%`(32, `%`_uN(($proj_uN_0(i).0 \ $lsizenn($lanetype_Jnn(I16_Jnn))),)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vbitmaskop_(v_ishape : ishape, v_vec_ : vec_) : u32 + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{v_M : dim, v : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, v_M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{v_M : dim, v : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, v_M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{v_M : dim, v : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, v_M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vbitmaskop_{v_M : dim, v : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, v_M),), v) = $ivbitmaskop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M), v) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vswizzlop_(v_bshape : bshape, v_vswizzlop_ : vswizzlop_, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vswizzlop_{v_M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, v_M),), mk_vswizzlop__0_vswizzlop_(v_M, SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, v_M), def $iswizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, v_M),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vswizzlop_{v_M : dim, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, v_M),), mk_vswizzlop__0_vswizzlop_(v_M, RELAXED_SWIZZLE_vswizzlop_M), v_1, v_2) = $ivswizzlop_(`%X%`_shape(I8_lanetype, v_M), def $irelaxed_swizzle_lane_, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vshufflop_(v_bshape : bshape, var_0 : laneidx*, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vshufflop_{v_M : dim, i_lst : laneidx*, v_1 : uN, v_2 : uN}(`%`_bshape(`%X%`_shape(I8_lanetype, v_M),), i_lst, v_1, v_2) = $ivshufflop_(`%X%`_shape(I8_lanetype, v_M), i_lst, v_1, v_2) + -- wf_shape: `%`(`%X%`_shape(I8_lanetype, v_M),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $vnarrowop__(shape_1 : shape, shape_2 : shape, v_sx : sx, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#148)))*{c_1#148 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_2#100)))*{c_2#100 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#2)*{c'_1#2 <- c'_1_lst} ++ mk_lane__2_lane_(I32_Jnn, c'_2#2)*{c'_2#2 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#3)))*{c'_1#3 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#3)))*{c'_2#3 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#150)))*{c_1#150 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_2#102)))*{c_2#102 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#5)*{c'_1#5 <- c'_1_lst} ++ mk_lane__2_lane_(I32_Jnn, c'_2#5)*{c'_2#5 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#6)))*{c'_1#6 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#6)))*{c'_2#6 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#152)))*{c_1#152 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_2#104)))*{c_2#104 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#8)*{c'_1#8 <- c'_1_lst} ++ mk_lane__2_lane_(I32_Jnn, c'_2#8)*{c'_2#8 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#9)))*{c'_1#9 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#9)))*{c'_2#9 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#154)))*{c_1#154 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_2#106)))*{c_2#106 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c'_1#11)*{c'_1#11 <- c'_1_lst} ++ mk_lane__2_lane_(I32_Jnn, c'_2#11)*{c'_2#11 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_1#12)))*{c'_1#12 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c'_2#12)))*{c'_2#12 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#156)))*{c_1#156 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_2#108)))*{c_2#108 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#14)*{c'_1#14 <- c'_1_lst} ++ mk_lane__2_lane_(I64_Jnn, c'_2#14)*{c'_2#14 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#15)))*{c'_1#15 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#15)))*{c'_2#15 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#158)))*{c_1#158 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_2#110)))*{c_2#110 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#17)*{c'_1#17 <- c'_1_lst} ++ mk_lane__2_lane_(I64_Jnn, c'_2#17)*{c'_2#17 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#18)))*{c'_1#18 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#18)))*{c'_2#18 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#160)))*{c_1#160 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_2#112)))*{c_2#112 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#20)*{c'_1#20 <- c'_1_lst} ++ mk_lane__2_lane_(I64_Jnn, c'_2#20)*{c'_2#20 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#21)))*{c'_1#21 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#21)))*{c'_2#21 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#162)))*{c_1#162 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_2#114)))*{c_2#114 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c'_1#23)*{c'_1#23 <- c'_1_lst} ++ mk_lane__2_lane_(I64_Jnn, c'_2#23)*{c'_2#23 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_1#24)))*{c'_1#24 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c'_2#24)))*{c'_2#24 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#164)))*{c_1#164 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_2#116)))*{c_2#116 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#26)*{c'_1#26 <- c'_1_lst} ++ mk_lane__2_lane_(I8_Jnn, c'_2#26)*{c'_2#26 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#27)))*{c'_1#27 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#27)))*{c'_2#27 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#166)))*{c_1#166 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_2#118)))*{c_2#118 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#29)*{c'_1#29 <- c'_1_lst} ++ mk_lane__2_lane_(I8_Jnn, c'_2#29)*{c'_2#29 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#30)))*{c'_1#30 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#30)))*{c'_2#30 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#168)))*{c_1#168 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_2#120)))*{c_2#120 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#32)*{c'_1#32 <- c'_1_lst} ++ mk_lane__2_lane_(I8_Jnn, c'_2#32)*{c'_2#32 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#33)))*{c'_1#33 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#33)))*{c'_2#33 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#170)))*{c_1#170 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_2#122)))*{c_2#122 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c'_1#35)*{c'_1#35 <- c'_1_lst} ++ mk_lane__2_lane_(I8_Jnn, c'_2#35)*{c'_2#35 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_1#36)))*{c'_1#36 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c'_2#36)))*{c'_2#36 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#172)))*{c_1#172 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I32_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_2#124)))*{c_2#124 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#38)*{c'_1#38 <- c'_1_lst} ++ mk_lane__2_lane_(I16_Jnn, c'_2#38)*{c'_2#38 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#39)))*{c'_1#39 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#39)))*{c'_2#39 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#174)))*{c_1#174 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I64_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_2#126)))*{c_2#126 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#41)*{c'_1#41 <- c'_1_lst} ++ mk_lane__2_lane_(I16_Jnn, c'_2#41)*{c'_2#41 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#42)))*{c'_1#42 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#42)))*{c'_2#42 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#176)))*{c_1#176 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I8_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_2#128)))*{c_2#128 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#44)*{c'_1#44 <- c'_1_lst} ++ mk_lane__2_lane_(I16_Jnn, c'_2#44)*{c'_2#44 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#45)))*{c'_1#45 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#45)))*{c'_2#45 <- c'_2_lst} + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $vnarrowop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), v_sx, v_1, v_2) = v + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2) + -- let{c'_1_lst : iN*} c'_1_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#178)))*{c_1#178 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $narrow__($lsize($lanetype_Jnn(I16_Jnn)), $lsize($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_2#130)))*{c_2#130 <- c_2_lst} + -- let{v : vec_} v = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c'_1#47)*{c'_1#47 <- c'_1_lst} ++ mk_lane__2_lane_(I16_Jnn, c'_2#47)*{c'_2#47 <- c'_2_lst}) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_1#48)))*{c'_1#48 <- c'_1_lst} + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c'_2#48)))*{c'_2#48 <- c'_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivadd_pairwise_(v_N : N, var_0 : iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivadd_pairwise_{v_N : nat, i_lst : iN*, j_1_lst : N*, j_2_lst : N*}(v_N, i_lst) = $iadd_(v_N, `%`_iN(j_1,), `%`_iN(j_2,))*{j_1 <- j_1_lst, j_2 <- j_2_lst} + -- if ($concat_(syntax N, [j_1#1 j_2#1]*{j_1#1 <- j_1_lst, j_2#1 <- j_2_lst}) = $proj_uN_0(i#93359).0*{i#93359 <- i_lst}) + -- (wf_uN: `%%`(v_N, `%`_uN(j_1#2,)))*{j_1#2 <- j_1_lst} + -- (wf_uN: `%%`(v_N, `%`_uN(j_2#2,)))*{j_2#2 <- j_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextunop__(shape_1 : shape, shape_2 : shape, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#307)*{c#307 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#180)))*{c_1#180 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#306)))*{c#306 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#310)*{c#310 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#182)))*{c_1#182 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#309)))*{c#309 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#313)*{c#313 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#184)))*{c_1#184 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#312)))*{c#312 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#316)*{c#316 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), v_sx, !($proj_lane__2(c_1#186)))*{c_1#186 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#315)))*{c#315 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#319)*{c#319 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#188)))*{c_1#188 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#318)))*{c#318 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#322)*{c#322 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#190)))*{c_1#190 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#321)))*{c#321 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#325)*{c#325 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#192)))*{c_1#192 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#324)))*{c#324 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#328)*{c#328 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), v_sx, !($proj_lane__2(c_1#194)))*{c_1#194 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#327)))*{c#327 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#331)*{c#331 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#196)))*{c_1#196 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#330)))*{c#330 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#334)*{c#334 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#198)))*{c_1#198 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#333)))*{c#333 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#337)*{c#337 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#200)))*{c_1#200 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#336)))*{c#336 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#340)*{c#340 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), v_sx, !($proj_lane__2(c_1#202)))*{c_1#202 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#339)))*{c#339 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#343)*{c#343 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#204)))*{c_1#204 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#342)))*{c#342 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#346)*{c#346 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#206)))*{c_1#206 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#345)))*{c#345 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#349)*{c#349 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#208)))*{c_1#208 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#348)))*{c#348 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextunop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*) : iN*, v_sx : sx, v_1 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, v_sx, v_1) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#352)*{c#352 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1) + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), v_sx, !($proj_lane__2(c_1#210)))*{c_1#210 <- c_1_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#351)))*{c#351 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vextunop__(ishape_1 : ishape, ishape_2 : ishape, v_vextunop__ : vextunop__, v_vec_ : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextunop__{M_1 : dim, M_2 : dim, v_sx : sx, v_1 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextunop___0_vextunop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(v_sx)), v_1) = $ivextunop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivadd_pairwise_, v_sx, v_1) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_(v_N : N, var_0 : iN*, var_1 : iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_{v_N : nat, i_1_lst : iN*, i_2_lst : iN*, j_1_lst : iN*, j_2_lst : iN*}(v_N, i_1_lst, i_2_lst) = $iadd_(v_N, j_1, j_2)*{j_1 <- j_1_lst, j_2 <- j_2_lst} + -- if ($concat_(syntax iN, [j_1#3 j_2#3]*{j_1#3 <- j_1_lst, j_2#3 <- j_2_lst}) = $imul_(v_N, i_1#2, i_2#2)*{i_1#2 <- i_1_lst, i_2#2 <- i_2_lst}) + -- (wf_uN: `%%`(v_N, j_1#4))*{j_1#4 <- j_1_lst} + -- (wf_uN: `%%`(v_N, j_2#4))*{j_2#4 <- j_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivextbinop__(shape_1 : shape, shape_2 : shape, def $f_(v_N : N, iN*, iN*) : iN*, v_sx : sx, v_sx_0 : sx, v_laneidx : laneidx, v_laneidx_0 : laneidx, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#355)*{c#355 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#212)))*{c_1#212 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#132)))*{c_2#132 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#354)))*{c#354 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#358)*{c#358 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#214)))*{c_1#214 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#134)))*{c_2#134 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#357)))*{c#357 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#361)*{c#361 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#216)))*{c_1#216 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#136)))*{c_2#136 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#360)))*{c#360 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I32_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, c#364)*{c#364 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_1, !($proj_lane__2(c_1#218)))*{c_1#218 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I32_Jnn)), sx_2, !($proj_lane__2(c_2#138)))*{c_2#138 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I32_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, c#363)))*{c#363 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#367)*{c#367 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#220)))*{c_1#220 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#140)))*{c_2#140 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#366)))*{c#366 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#370)*{c#370 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#222)))*{c_1#222 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#142)))*{c_2#142 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#369)))*{c#369 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#373)*{c#373 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#224)))*{c_1#224 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#144)))*{c_2#144 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#372)))*{c#372 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I64_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, c#376)*{c#376 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_1, !($proj_lane__2(c_1#226)))*{c_1#226 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I64_Jnn)), sx_2, !($proj_lane__2(c_2#146)))*{c_2#146 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I64_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, c#375)))*{c#375 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#379)*{c#379 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#228)))*{c_1#228 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#148)))*{c_2#148 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#378)))*{c#378 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#382)*{c#382 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#230)))*{c_1#230 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#150)))*{c_2#150 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#381)))*{c#381 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#385)*{c#385 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#232)))*{c_1#232 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#152)))*{c_2#152 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#384)))*{c#384 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I8_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, c#388)*{c#388 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_1, !($proj_lane__2(c_1#234)))*{c_1#234 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I8_Jnn)), sx_2, !($proj_lane__2(c_2#154)))*{c_2#154 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I8_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, c#387)))*{c#387 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I32_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#391)*{c#391 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#236)))*{c_1#236 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#156)))*{c_2#156 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#390)))*{c#390 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I64_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#394)*{c#394 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#238)))*{c_1#238 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#158)))*{c_2#158 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#393)))*{c#393 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I8_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#397)*{c#397 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#240)))*{c_1#240 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#160)))*{c_2#160 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#396)))*{c#396 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivextbinop__{M_1 : dim, M_2 : dim, def $f_(v_N : N, iN*, iN*) : iN*, sx_1 : sx, sx_2 : sx, i : uN, k : uN, v_1 : uN, v_2 : uN}(`%X%`_shape(I16_lanetype, M_1), `%X%`_shape(I16_lanetype, M_2), def $f_, sx_1, sx_2, i, k, v_1, v_2) = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, c#400)*{c#400 <- c_lst}) + -- let{c_1_lst : lane_*} c_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_1)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c_2_lst : lane_*} c_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), v_2)[$proj_uN_0(i).0 : $proj_uN_0(k).0] + -- let{c'_1_lst : iN*} c'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_1, !($proj_lane__2(c_1#242)))*{c_1#242 <- c_1_lst} + -- let{c'_2_lst : iN*} c'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), $lsizenn2($lanetype_Jnn(I16_Jnn)), sx_2, !($proj_lane__2(c_2#162)))*{c_2#162 <- c_2_lst} + -- let{c_lst : iN*} c_lst = $f_($lsizenn2($lanetype_Jnn(I16_Jnn)), c'_1_lst, c'_2_lst) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, c#399)))*{c#399 <- c_lst} + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivmul_(v_N : N, var_0 : iN*, var_1 : iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivmul_{v_N : nat, i_1_lst : iN*, i_2_lst : iN*}(v_N, i_1_lst, i_2_lst) = $imul_(v_N, i_1, i_2)*{i_1 <- i_1_lst, i_2 <- i_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivdot_sat_(v_N : N, var_0 : iN*, var_1 : iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivdot_sat_{v_N : nat, i_1_lst : iN*, i_2_lst : iN*, j_1_lst : iN*, j_2_lst : iN*}(v_N, i_1_lst, i_2_lst) = $iadd_sat_(v_N, S_sx, j_1, j_2)*{j_1 <- j_1_lst, j_2 <- j_2_lst} + -- if ($concat_(syntax iN, [j_1#5 j_2#5]*{j_1#5 <- j_1_lst, j_2#5 <- j_2_lst}) = $imul_(v_N, i_1#5, i_2#5)*{i_1#5 <- i_1_lst, i_2#5 <- i_2_lst}) + -- (wf_uN: `%%`(v_N, j_1#6))*{j_1#6 <- j_1_lst} + -- (wf_uN: `%%`(v_N, j_2#6))*{j_2#6 <- j_2_lst} + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $ivrelaxed_dot_(v_N : N, var_0 : iN*, var_1 : iN*) : iN* + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $ivrelaxed_dot_{v_N : nat, i_1_lst : iN*, i_2_lst : iN*}(v_N, i_1_lst, i_2_lst) = $fun_relaxed2($R_idot, syntax iN*, $ivdot_(v_N, i_1_lst, i_2_lst), $ivdot_sat_(v_N, i_1_lst, i_2_lst)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vextbinop__(ishape_1 : ishape, ishape_2 : ishape, v_vextbinop__ : vextbinop__, v_vec_ : vec_, v_vec__0 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_half : half, v_sx : sx, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(v_half, v_sx)), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivmul_, v_sx, v_sx, `%`_laneidx($fun_half(v_half, 0, $proj_dim_0(M_2).0),), `%`_laneidx($proj_dim_0(M_2).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN($fun_half(v_half, 0, $proj_dim_0(M_2).0),)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_2).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivdot_, S_sx, S_sx, `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextbinop__{M_1 : dim, M_2 : dim, v_1 : uN, v_2 : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextbinop___0_vextbinop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2), v_1, v_2) = $ivextbinop__(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), `%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), def $ivrelaxed_dot_, S_sx, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), `%`_laneidx(0,), `%`_laneidx($proj_dim_0(M_1).0,), v_1, v_2) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- wf_uN: `%%`(8, `%`_uN(0,)) + -- wf_uN: `%%`(8, `%`_uN($proj_dim_0(M_1).0,)) + +;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec +def $fun_vextternop__(ishape_1 : ishape, ishape_2 : ishape, v_vextternop__ : vextternop__, v_vec_ : vec_, v_vec__0 : vec_, v_vec__1 : vec_) : vec_ + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#2)))*{ci_1#2 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#2)))*{ci_2#2 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#2)*{ci#2 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#125)*{iter_0#125 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#126)))*{iter_0#126 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#4)))*{ci_1#4 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#4)))*{ci_2#4 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#4)*{ci#4 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#127)*{iter_0#127 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#128)))*{iter_0#128 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#6)))*{ci_1#6 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#6)))*{ci_2#6 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#6)*{ci#6 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#129)*{iter_0#129 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#130)))*{iter_0#130 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I32_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I32_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I32_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#8)))*{ci_1#8 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#8)))*{ci_2#8 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I32_Jnn)), S_sx, ci#8)*{ci#8 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_lane__2_lane_(I32_Jnn, iter_0#131)*{iter_0#131 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2)), mk_lane__2_lane_(I32_Jnn, iter_0#132)))*{iter_0#132 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I32_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_2), mk_vbinop__0_vbinop_(I32_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#10)))*{ci_1#10 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#10)))*{ci_2#10 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#10)*{ci#10 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#133)*{iter_0#133 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#134)))*{iter_0#134 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#12)))*{ci_1#12 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#12)))*{ci_2#12 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#12)*{ci#12 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#135)*{iter_0#135 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#136)))*{iter_0#136 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#14)))*{ci_1#14 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#14)))*{ci_2#14 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#14)*{ci#14 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#137)*{iter_0#137 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#138)))*{iter_0#138 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I64_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I64_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I64_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#16)))*{ci_1#16 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#16)))*{ci_2#16 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I64_Jnn)), S_sx, ci#16)*{ci#16 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_lane__2_lane_(I64_Jnn, iter_0#139)*{iter_0#139 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2)), mk_lane__2_lane_(I64_Jnn, iter_0#140)))*{iter_0#140 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I64_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_2), mk_vbinop__0_vbinop_(I64_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#18)))*{ci_1#18 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#18)))*{ci_2#18 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#18)*{ci#18 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#141)*{iter_0#141 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#142)))*{iter_0#142 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#20)))*{ci_1#20 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#20)))*{ci_2#20 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#20)*{ci#20 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#143)*{iter_0#143 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#144)))*{iter_0#144 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#22)))*{ci_1#22 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#22)))*{ci_2#22 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#22)*{ci#22 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#145)*{iter_0#145 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#146)))*{iter_0#146 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I8_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I8_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I8_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#24)))*{ci_1#24 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#24)))*{ci_2#24 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I8_Jnn)), S_sx, ci#24)*{ci#24 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_lane__2_lane_(I8_Jnn, iter_0#147)*{iter_0#147 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2)), mk_lane__2_lane_(I8_Jnn, iter_0#148)))*{iter_0#148 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I8_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_2), mk_vbinop__0_vbinop_(I8_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I32_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I32_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I32_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#26)))*{ci_1#26 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I32_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#26)))*{ci_2#26 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#26)*{ci#26 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#149)*{iter_0#149 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I32_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#150)))*{iter_0#150 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I64_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I64_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I64_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#28)))*{ci_1#28 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I64_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#28)))*{ci_2#28 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#28)*{ci#28 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#151)*{iter_0#151 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I64_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#152)))*{iter_0#152 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I8_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I8_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I8_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#30)))*{ci_1#30 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I8_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#30)))*{ci_2#30 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#30)*{ci#30 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#153)*{iter_0#153 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I8_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#154)))*{iter_0#154 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/3.2-numerics.vector.spectec + def $fun_vextternop__{M_1 : dim, M_2 : dim, c_1 : uN, c_2 : uN, c_3 : uN, c : uN}(`%`_ishape(`%X%`_shape(I16_lanetype, M_1),), `%`_ishape(`%X%`_shape(I16_lanetype, M_2),), mk_vextternop___0_vextternop__(I16_Jnn, M_1, I16_Jnn, M_2, RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2), c_1, c_2, c_3) = c + -- let{v_N : N} v_N = $fun_relaxed2($R_idot_add, syntax nat, (2 * $lsizenn1($lanetype_Jnn(I16_Jnn))), $lsizenn2($lanetype_Jnn(I16_Jnn))) + -- let{ci_1_lst : lane_*} ci_1_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_1) + -- let{ci_2_lst : lane_*} ci_2_lst = $lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1), c_2) + -- let{ci'_1_lst : iN*} ci'_1_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, S_sx, !($proj_lane__2(ci_1#32)))*{ci_1#32 <- ci_1_lst} + -- let{ci'_2_lst : iN*} ci'_2_lst = $extend__($lsizenn1($lanetype_Jnn(I16_Jnn)), v_N, $fun_relaxed2($R_idot, syntax sx, S_sx, U_sx), !($proj_lane__2(ci_2#32)))*{ci_2#32 <- ci_2_lst} + -- let{ci_lst : iN*} ci_lst = $ivrelaxed_dot_(v_N, ci'_1_lst, ci'_2_lst) + -- let{ci'_lst : iN*} ci'_lst = $extend__(v_N, $lsizenn2($lanetype_Jnn(I16_Jnn)), S_sx, ci#32)*{ci#32 <- ci_lst} + -- let{c' : vec_} c' = $inv_lanes_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_lane__2_lane_(I16_Jnn, iter_0#155)*{iter_0#155 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)}) + -- if (c <- $fun_vbinop_(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M), c', c_3)) + -- wf_uN: `%%`(128, c) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_1),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2)), mk_lane__2_lane_(I16_Jnn, iter_0#156)))*{iter_0#156 <- $ivadd_pairwise_($lsizenn2($lanetype_Jnn(I16_Jnn)), ci'_lst)} + -- wf_vbinop_: `%%`(`%X%`_shape($lanetype_Jnn(I16_Jnn), M_2), mk_vbinop__0_vbinop_(I16_Jnn, M_2, ADD_vbinop_Jnn_M)) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax num = + | CONST(v_numtype : numtype, num_) + +def $val_num(var_0 : num) : val + def $val_num{x0 : numtype, x1 : num_}(CONST_num(x0, x1)) = CONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_num: `%`(num,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule num_case_0{v_numtype : numtype, var_0 : num_}: + `%`(CONST_num(v_numtype, var_0),) + -- wf_num_: `%%`(v_numtype, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax vec = + | VCONST(v_vectype : vectype, vec_) + +def $val_vec(var_0 : vec) : val + def $val_vec{x0 : vectype, x1 : vec_}(VCONST_vec(x0, x1)) = VCONST_val(x0, x1) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_vec: `%`(vec,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule vec_case_0{v_vectype : vectype, var_0 : vec_}: + `%`(VCONST_vec(v_vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax result = + | _VALS(val*) + | `(REF.EXN_ADDR%)THROW_REF`(exnaddr) + | TRAP + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_result: `%`(result,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_0{var_0 : val*}: + `%`(_VALS_result(var_0),) + -- (wf_val: `%`(var_0,))*{var_0 <- var_0} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_1{var_0 : exnaddr}: + `%`(`(REF.EXN_ADDR%)THROW_REF`_result(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule result_case_2: + `%`(TRAP_result,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostfunc = + | _HOSTFUNC(text) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funccode = + | FUNC(v_typeidx : typeidx, local_lst : local*, v_expr : expr) + | _HOSTFUNC(text) + +def $funccode_func(var_0 : func) : funccode + def $funccode_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_funccode(x0, x1, x2) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funccode: `%`(funccode,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_0{v_typeidx : typeidx, local_lst : local*, v_expr : expr}: + `%`(FUNC_funccode(v_typeidx, local_lst, v_expr),) + -- wf_uN: `%%`(32, v_typeidx) + -- (wf_local: `%`(v_local,))*{v_local <- local_lst} + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funccode_case_1{var_0 : text}: + `%`(_HOSTFUNC_funccode(var_0),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax taginst = +{ + TYPE tagtype +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_taginst: `%`(taginst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule taginst_case_{var_0 : tagtype}: + `%`({TYPE var_0},) + -- wf_typeuse: `%`(var_0,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax globalinst = +{ + TYPE globaltype, + VALUE val +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_globalinst: `%`(globalinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule globalinst_case_{var_0 : globaltype, var_1 : val}: + `%`({TYPE var_0, VALUE var_1},) + -- wf_globaltype: `%`(var_0,) + -- wf_val: `%`(var_1,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax meminst = +{ + TYPE memtype, + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_meminst: `%`(meminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule meminst_case_{var_0 : memtype, var_1 : byte*}: + `%`({TYPE var_0, BYTES var_1},) + -- wf_memtype: `%`(var_0,) + -- (wf_byte: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax tableinst = +{ + TYPE tabletype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_tableinst: `%`(tableinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule tableinst_case_{var_0 : tabletype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_tabletype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax funcinst = +{ + TYPE deftype, + MODULE moduleinst, + CODE funccode +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_funcinst: `%`(funcinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule funcinst_case_{var_0 : deftype, var_1 : moduleinst, var_2 : funccode}: + `%`({TYPE var_0, MODULE var_1, CODE var_2},) + -- wf_moduleinst: `%`(var_1,) + -- wf_funccode: `%`(var_2,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax datainst = +{ + BYTES byte* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_datainst: `%`(datainst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule datainst_case_{var_0 : byte*}: + `%`({BYTES var_0},) + -- (wf_byte: `%`(var_0,))*{var_0 <- var_0} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax eleminst = +{ + TYPE elemtype, + REFS ref* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_eleminst: `%`(eleminst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule eleminst_case_{var_0 : elemtype, var_1 : ref*}: + `%`({TYPE var_0, REFS var_1},) + -- wf_reftype: `%`(var_0,) + -- (wf_ref: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax packval = + | PACK(v_packtype : packtype, iN) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_packval: `%`(packval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule packval_case_0{v_packtype : packtype, var_0 : iN}: + `%`(PACK_packval(v_packtype, var_0),) + -- wf_uN: `%%`($psize(v_packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax fieldval = + | CONST(v_numtype : numtype, num_) + | VCONST(v_vectype : vectype, vec_) + | `REF.I31_NUM`(u31) + | `REF.NULL_ADDR` + | `REF.STRUCT_ADDR`(structaddr) + | `REF.ARRAY_ADDR`(arrayaddr) + | `REF.FUNC_ADDR`(funcaddr) + | `REF.EXN_ADDR`(exnaddr) + | `REF.HOST_ADDR`(hostaddr) + | `REF.EXTERN`(ref) + | PACK(v_packtype : packtype, iN) + +def $fieldval_packval(var_0 : packval) : fieldval + def $fieldval_packval{x0 : packtype, x1 : iN}(PACK_packval(x0, x1)) = PACK_fieldval(x0, x1) + +def $fieldval_ref(var_0 : ref) : fieldval + def $fieldval_ref{x : u31}(`REF.I31_NUM`_ref(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_ref(`REF.NULL_ADDR`_ref) = `REF.NULL_ADDR`_fieldval + def $fieldval_ref{x : structaddr}(`REF.STRUCT_ADDR`_ref(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_ref{x : arrayaddr}(`REF.ARRAY_ADDR`_ref(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_ref{x : funcaddr}(`REF.FUNC_ADDR`_ref(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_ref{x : exnaddr}(`REF.EXN_ADDR`_ref(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_ref{x : hostaddr}(`REF.HOST_ADDR`_ref(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_ref{x : ref}(`REF.EXTERN`_ref(x)) = `REF.EXTERN`_fieldval(x) + +def $fieldval_val(var_0 : val) : fieldval + def $fieldval_val{x0 : numtype, x1 : num_}(CONST_val(x0, x1)) = CONST_fieldval(x0, x1) + def $fieldval_val{x0 : vectype, x1 : vec_}(VCONST_val(x0, x1)) = VCONST_fieldval(x0, x1) + def $fieldval_val{x : u31}(`REF.I31_NUM`_val(x)) = `REF.I31_NUM`_fieldval(x) + def $fieldval_val(`REF.NULL_ADDR`_val) = `REF.NULL_ADDR`_fieldval + def $fieldval_val{x : structaddr}(`REF.STRUCT_ADDR`_val(x)) = `REF.STRUCT_ADDR`_fieldval(x) + def $fieldval_val{x : arrayaddr}(`REF.ARRAY_ADDR`_val(x)) = `REF.ARRAY_ADDR`_fieldval(x) + def $fieldval_val{x : funcaddr}(`REF.FUNC_ADDR`_val(x)) = `REF.FUNC_ADDR`_fieldval(x) + def $fieldval_val{x : exnaddr}(`REF.EXN_ADDR`_val(x)) = `REF.EXN_ADDR`_fieldval(x) + def $fieldval_val{x : hostaddr}(`REF.HOST_ADDR`_val(x)) = `REF.HOST_ADDR`_fieldval(x) + def $fieldval_val{x : ref}(`REF.EXTERN`_val(x)) = `REF.EXTERN`_fieldval(x) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_fieldval: `%`(fieldval,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_0{v_numtype : numtype, var_0 : num_}: + `%`(CONST_fieldval(v_numtype, var_0),) + -- wf_num_: `%%`(v_numtype, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_1{v_vectype : vectype, var_0 : vec_}: + `%`(VCONST_fieldval(v_vectype, var_0),) + -- wf_uN: `%%`(128, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_2{var_0 : u31}: + `%`(`REF.I31_NUM`_fieldval(var_0),) + -- wf_uN: `%%`(31, var_0) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_3: + `%`(`REF.NULL_ADDR`_fieldval,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_4{var_0 : structaddr}: + `%`(`REF.STRUCT_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_5{var_0 : arrayaddr}: + `%`(`REF.ARRAY_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_6{var_0 : funcaddr}: + `%`(`REF.FUNC_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_7{var_0 : exnaddr}: + `%`(`REF.EXN_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_8{var_0 : hostaddr}: + `%`(`REF.HOST_ADDR`_fieldval(var_0),) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_9{var_0 : ref}: + `%`(`REF.EXTERN`_fieldval(var_0),) + -- wf_ref: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule fieldval_case_10{v_packtype : packtype, var_0 : iN}: + `%`(PACK_fieldval(v_packtype, var_0),) + -- wf_uN: `%%`($psize(v_packtype), var_0) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax structinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_structinst: `%`(structinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule structinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax arrayinst = +{ + TYPE deftype, + FIELDS fieldval* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_arrayinst: `%`(arrayinst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule arrayinst_case_{var_0 : deftype, var_1 : fieldval*}: + `%`({TYPE var_0, FIELDS var_1},) + -- (wf_fieldval: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax exninst = +{ + TAG tagaddr, + FIELDS val* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_exninst: `%`(exninst,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule exninst_case_{var_0 : tagaddr, var_1 : val*}: + `%`({TAG var_0, FIELDS var_1},) + -- (wf_val: `%`(var_1,))*{var_1 <- var_1} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax store = +{ + TAGS taginst*, + GLOBALS globalinst*, + MEMS meminst*, + TABLES tableinst*, + FUNCS funcinst*, + DATAS datainst*, + ELEMS eleminst*, + STRUCTS structinst*, + ARRAYS arrayinst*, + EXNS exninst* +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_store: `%`(store,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule store_case_{var_0 : taginst*, var_1 : globalinst*, var_2 : meminst*, var_3 : tableinst*, var_4 : funcinst*, var_5 : datainst*, var_6 : eleminst*, var_7 : structinst*, var_8 : arrayinst*, var_9 : exninst*}: + `%`({TAGS var_0, GLOBALS var_1, MEMS var_2, TABLES var_3, FUNCS var_4, DATAS var_5, ELEMS var_6, STRUCTS var_7, ARRAYS var_8, EXNS var_9},) + -- (wf_taginst: `%`(var_0,))*{var_0 <- var_0} + -- (wf_globalinst: `%`(var_1,))*{var_1 <- var_1} + -- (wf_meminst: `%`(var_2,))*{var_2 <- var_2} + -- (wf_tableinst: `%`(var_3,))*{var_3 <- var_3} + -- (wf_funcinst: `%`(var_4,))*{var_4 <- var_4} + -- (wf_datainst: `%`(var_5,))*{var_5 <- var_5} + -- (wf_eleminst: `%`(var_6,))*{var_6 <- var_6} + -- (wf_structinst: `%`(var_7,))*{var_7 <- var_7} + -- (wf_arrayinst: `%`(var_8,))*{var_8 <- var_8} + -- (wf_exninst: `%`(var_9,))*{var_9 <- var_9} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax state = + | `%;%`(v_store : store, v_frame : frame) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_state: `%`(state,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule state_case_0{v_store : store, v_frame : frame}: + `%`(`%;%`_state(v_store, v_frame),) + -- wf_store: `%`(v_store,) + -- wf_frame: `%`(v_frame,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax config = + | `%;%`(v_state : state, instr_lst : instr*) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_config: `%`(config,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule config_case_0{v_state : state, instr_lst : instr*}: + `%`(`%;%`_config(v_state, instr_lst),) + -- wf_state: `%`(v_state,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $Ki : nat + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $Ki = 1024 + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $packfield_(v_storagetype : storagetype, v_val : val) : fieldval? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(BOT_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{null_opt : null?, v_heaptype : heaptype, v_val : val}(REF_storagetype(null_opt, v_heaptype), v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(V128_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(F64_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(F32_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(I64_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{v_val : val}(I32_storagetype, v_val) = ?($fieldval_val(v_val)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I8_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I8_packtype, $wrap__(32, $psize(I8_packtype), i)),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $packfield_{i : uN}(I16_storagetype, CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, i))) = ?(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i))) + -- wf_fieldval: `%`(PACK_fieldval(I16_packtype, $wrap__(32, $psize(I16_packtype), i)),) + def $packfield_{x0 : storagetype, x1 : val}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $unpackfield_(v_storagetype : storagetype, var_0 : sx?, v_fieldval : fieldval) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(BOT_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(V128_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(F32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I64_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_8 : ref}(I32_storagetype, ?(), `REF.EXTERN`_fieldval(var_8)) = ?(`REF.EXTERN`_val(var_8)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(BOT_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(V128_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(F32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I64_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_7 : hostaddr}(I32_storagetype, ?(), `REF.HOST_ADDR`_fieldval(var_7)) = ?(`REF.HOST_ADDR`_val(var_7)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(BOT_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(V128_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(F32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I64_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_6 : exnaddr}(I32_storagetype, ?(), `REF.EXN_ADDR`_fieldval(var_6)) = ?(`REF.EXN_ADDR`_val(var_6)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(BOT_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(V128_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(F32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I64_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_5 : funcaddr}(I32_storagetype, ?(), `REF.FUNC_ADDR`_fieldval(var_5)) = ?(`REF.FUNC_ADDR`_val(var_5)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(BOT_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(V128_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(F32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I64_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_4 : arrayaddr}(I32_storagetype, ?(), `REF.ARRAY_ADDR`_fieldval(var_4)) = ?(`REF.ARRAY_ADDR`_val(var_4)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(BOT_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(V128_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(F32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I64_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_3 : structaddr}(I32_storagetype, ?(), `REF.STRUCT_ADDR`_fieldval(var_3)) = ?(`REF.STRUCT_ADDR`_val(var_3)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(BOT_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(V128_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(F32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I64_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_(I32_storagetype, ?(), `REF.NULL_ADDR`_fieldval) = ?(`REF.NULL_ADDR`_val) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(BOT_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(V128_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(F32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I64_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{var_2 : u31}(I32_storagetype, ?(), `REF.I31_NUM`_fieldval(var_2)) = ?(`REF.I31_NUM`_val(var_2)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(BOT_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(V128_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(F64_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(F32_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(I64_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_vectype : vectype, var_1 : vec_}(I32_storagetype, ?(), VCONST_fieldval(v_vectype, var_1)) = ?(VCONST_val(v_vectype, var_1)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(BOT_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_, null_opt : null?, v_heaptype : heaptype}(REF_storagetype(null_opt, v_heaptype), ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(V128_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(F64_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(F32_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(I64_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_numtype : numtype, var_0 : num_}(I32_storagetype, ?(), CONST_fieldval(v_numtype, var_0)) = ?(CONST_val(v_numtype, var_0)) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_sx : sx, i : uN}(I8_storagetype, ?(v_sx), PACK_fieldval(I8_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, v_sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I8_packtype), 32, v_sx, i))),) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $unpackfield_{v_sx : sx, i : uN}(I16_storagetype, ?(v_sx), PACK_fieldval(I16_packtype, i)) = ?(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, v_sx, i)))) + -- wf_val: `%`(CONST_val(I32_numtype, mk_num__0_num_(I32_Inn, $extend__($psize(I16_packtype), 32, v_sx, i))),) + def $unpackfield_{x0 : storagetype, x1 : sx?, x2 : fieldval}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:190.1-190.86 +def $tagsxa(var_0 : externaddr*) : tagaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:196.1-196.23 + def $tagsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:197.1-197.42 + def $tagsxa{a : nat, xa_lst : externaddr*}([TAG_externaddr(a)] ++ xa_lst) = [a] ++ $tagsxa(xa_lst) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:198.1-198.57 + def $tagsxa{v_externaddr : externaddr, xa_lst : externaddr*}([v_externaddr] ++ xa_lst) = $tagsxa(xa_lst) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:191.1-191.89 +def $globalsxa(var_0 : externaddr*) : globaladdr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:200.1-200.26 + def $globalsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:201.1-201.51 + def $globalsxa{a : nat, xa_lst : externaddr*}([GLOBAL_externaddr(a)] ++ xa_lst) = [a] ++ $globalsxa(xa_lst) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:202.1-202.63 + def $globalsxa{v_externaddr : externaddr, xa_lst : externaddr*}([v_externaddr] ++ xa_lst) = $globalsxa(xa_lst) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:192.1-192.86 +def $memsxa(var_0 : externaddr*) : memaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:204.1-204.23 + def $memsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:205.1-205.42 + def $memsxa{a : nat, xa_lst : externaddr*}([MEM_externaddr(a)] ++ xa_lst) = [a] ++ $memsxa(xa_lst) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:206.1-206.57 + def $memsxa{v_externaddr : externaddr, xa_lst : externaddr*}([v_externaddr] ++ xa_lst) = $memsxa(xa_lst) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:193.1-193.88 +def $tablesxa(var_0 : externaddr*) : tableaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:208.1-208.25 + def $tablesxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:209.1-209.48 + def $tablesxa{a : nat, xa_lst : externaddr*}([TABLE_externaddr(a)] ++ xa_lst) = [a] ++ $tablesxa(xa_lst) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:210.1-210.61 + def $tablesxa{v_externaddr : externaddr, xa_lst : externaddr*}([v_externaddr] ++ xa_lst) = $tablesxa(xa_lst) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:194.1-194.87 +def $funcsxa(var_0 : externaddr*) : funcaddr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:212.1-212.24 + def $funcsxa([]) = [] + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:213.1-213.45 + def $funcsxa{a : nat, xa_lst : externaddr*}([FUNC_externaddr(a)] ++ xa_lst) = [a] ++ $funcsxa(xa_lst) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec:214.1-214.59 + def $funcsxa{v_externaddr : externaddr, xa_lst : externaddr*}([v_externaddr] ++ xa_lst) = $funcsxa(xa_lst) +} + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_store(v_state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_store{v_s : store, v_f : frame}(`%;%`_state(v_s, v_f)) = v_s + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_frame(v_state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_frame{v_s : store, v_f : frame}(`%;%`_state(v_s, v_f)) = v_f + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $s(v_state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $s{z : state}(z) = $fun_store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $f(v_state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $f{z : state}(z) = $fun_frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $sof(v_state : state) : store + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $sof{z : state}(z) = $fun_store(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fof(v_state : state) : frame + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fof{z : state}(z) = $fun_frame(z) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_moduleinst(v_state : state) : moduleinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_moduleinst{z : state}(z) = $fof(z).MODULE_frame + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_funcinst(v_state : state, v_funcaddr : funcaddr) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_funcinst{z : state, a : nat}(z, a) = $sof(z).FUNCS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_structinst(v_state : state, v_structaddr : structaddr) : structinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_structinst{z : state, a : nat}(z, a) = $sof(z).STRUCTS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_arrayinst(v_state : state, v_arrayaddr : arrayaddr) : arrayinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_arrayinst{z : state, a : nat}(z, a) = $sof(z).ARRAYS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_exninst(v_state : state, v_exnaddr : exnaddr) : exninst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_exninst{z : state, a : nat}(z, a) = $sof(z).EXNS_store[a] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_type(v_state : state, v_typeidx : typeidx) : deftype + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_type{z : state, x : uN}(z, x) = $fof(z).MODULE_frame.TYPES_moduleinst[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_tag(v_state : state, v_tagidx : tagidx) : taginst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_tag{z : state, x : uN}(z, x) = $sof(z).TAGS_store[$fof(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_global(v_state : state, v_globalidx : globalidx) : globalinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_global{z : state, x : uN}(z, x) = $sof(z).GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_mem(v_state : state, v_memidx : memidx) : meminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_mem{z : state, x : uN}(z, x) = $sof(z).MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_table(v_state : state, v_tableidx : tableidx) : tableinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_table{z : state, x : uN}(z, x) = $sof(z).TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_func(v_state : state, v_funcidx : funcidx) : funcinst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_func{z : state, x : uN}(z, x) = $sof(z).FUNCS_store[$fof(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_data(v_state : state, v_dataidx : dataidx) : datainst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_data{z : state, x : uN}(z, x) = $sof(z).DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_elem(v_state : state, v_tableidx : tableidx) : eleminst + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_elem{z : state, x : uN}(z, x) = $sof(z).ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $fun_local(v_state : state, v_localidx : localidx) : val? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $fun_local{z : state, x : uN}(z, x) = $fof(z).LOCALS_frame[$proj_uN_0(x).0] + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_local(v_state : state, v_localidx : localidx, v_val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_local{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]) + -- wf_state: `%`(`%;%`_state($sof(z), $fof(z)[LOCALS_frame[$proj_uN_0(x).0] = ?(v)]),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_global(v_state : state, v_globalidx : globalidx, v_val : val) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_global{z : state, x : uN, v : val}(z, x, v) = `%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[GLOBALS_store[$fof(z).MODULE_frame.GLOBALS_moduleinst[$proj_uN_0(x).0]].VALUE_globalinst = v], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_table(v_state : state, v_tableidx : tableidx, nat : nat, v_ref : ref) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_table{z : state, x : uN, i : nat, r : ref}(z, x, i, r) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]].REFS_tableinst[i] = r], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_tableinst(v_state : state, v_tableidx : tableidx, v_tableinst : tableinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_tableinst{z : state, x : uN, ti : tableinst}(z, x, ti) = `%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[TABLES_store[$fof(z).MODULE_frame.TABLES_moduleinst[$proj_uN_0(x).0]] = ti], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_mem(v_state : state, v_memidx : memidx, nat : nat, nat_0 : nat, var_0 : byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_mem{z : state, x : uN, i : nat, j : nat, b_lst : byte*}(z, x, i, j, b_lst) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b_lst], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]].BYTES_meminst[i : j] = b_lst], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_meminst(v_state : state, v_memidx : memidx, v_meminst : meminst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_meminst{z : state, x : uN, mi : meminst}(z, x, mi) = `%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[MEMS_store[$fof(z).MODULE_frame.MEMS_moduleinst[$proj_uN_0(x).0]] = mi], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_elem(v_state : state, v_elemidx : elemidx, var_0 : ref*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_elem{z : state, x : uN, r_lst : ref*}(z, x, r_lst) = `%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r_lst], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ELEMS_store[$fof(z).MODULE_frame.ELEMS_moduleinst[$proj_uN_0(x).0]].REFS_eleminst = r_lst], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_data(v_state : state, v_dataidx : dataidx, var_0 : byte*) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_data{z : state, x : uN, b_lst : byte*}(z, x, b_lst) = `%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b_lst], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[DATAS_store[$fof(z).MODULE_frame.DATAS_moduleinst[$proj_uN_0(x).0]].BYTES_datainst = b_lst], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_struct(v_state : state, v_structaddr : structaddr, nat : nat, v_fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_struct{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store[a].FIELDS_structinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $with_array(v_state : state, v_arrayaddr : arrayaddr, nat : nat, v_fieldval : fieldval) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $with_array{z : state, a : nat, i : nat, fv : fieldval}(z, a, i, fv) = `%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store[a].FIELDS_arrayinst[i] = fv], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_structinst(v_state : state, v_structinst : structinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_structinst{z : state, si : structinst}(z, si) = `%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[STRUCTS_store =++ [si]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_arrayinst(v_state : state, v_arrayinst : arrayinst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_arrayinst{z : state, ai : arrayinst}(z, ai) = `%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[ARRAYS_store =++ [ai]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $add_exninst(v_state : state, v_exninst : exninst) : state + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $add_exninst{z : state, exn : exninst}(z, exn) = `%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)) + -- wf_state: `%`(`%;%`_state($sof(z)[EXNS_store =++ [exn]], $fof(z)),) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growtable(v_tableinst : tableinst, nat : nat, v_ref : ref) : tableinst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growtable{v_tableinst : tableinst, v_n : nat, r : ref, tableinst' : tableinst, i' : uN}(v_tableinst, v_n, r) = ?(tableinst') + -- let{at : addrtype, i : u64, j_opt : u64?, rt : reftype, r'_lst : ref*} {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j_opt), rt), REFS r'_lst} = v_tableinst + -- if (tableinst' = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j_opt), rt), REFS r'_lst ++ r^v_n{}}) + -- if ($proj_uN_0(i').0 = (|r'_lst| + v_n)) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#3).0))?{j#3 <- j_opt} + -- if (($proj_uN_0(i').0 : nat <:> int) <= (((2 ^ $size($numtype_addrtype(at))) : nat <:> int) - (1 : nat <:> int))) + -- wf_tableinst: `%`(tableinst',) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j_opt), rt), REFS r'_lst},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i', j_opt), rt), REFS r'_lst ++ r^v_n{}},) + def $growtable{x0 : tableinst, x1 : nat, x2 : ref}(x0, x1, x2) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $growmem(v_meminst : meminst, nat : nat) : meminst? + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $growmem{v_meminst : meminst, v_n : nat, meminst' : meminst, i' : uN}(v_meminst, v_n) = ?(meminst') + -- let{at : addrtype, i : u64, j_opt : u64?, b_lst : byte*} {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j_opt)), BYTES b_lst} = v_meminst + -- if (meminst' = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j_opt)), BYTES b_lst ++ `%`_byte(0,)^(v_n * (64 * $Ki)){}}) + -- if (($proj_uN_0(i').0 : nat <:> rat) = (((|b_lst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) + (v_n : nat <:> rat))) + -- (if ($proj_uN_0(i').0 <= $proj_uN_0(j#8).0))?{j#8 <- j_opt} + -- if ($proj_uN_0(i').0 <= (2 ^ ((($size($numtype_addrtype(at)) : nat <:> int) - (16 : nat <:> int)) : int <:> nat))) + -- wf_meminst: `%`(meminst',) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j_opt)), BYTES b_lst},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i', j_opt)), BYTES b_lst ++ `%`_byte(0,)^(v_n * (64 * $Ki)){}},) + def $growmem{x0 : meminst, x1 : nat}(x0, x1) = ?() + -- otherwise + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +syntax hostcallresult = + | RES(v_store : store, v_result : result) + | BOT + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +relation wf_hostcallresult: `%`(hostcallresult,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_0{v_store : store, v_result : result}: + `%`(RES_hostcallresult(v_store, v_result),) + -- wf_store: `%`(v_store,) + -- wf_result: `%`(v_result,) + + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + rule hostcallresult_case_1: + `%`(BOT_hostcallresult,) + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $hostcall(v_hostfunc : hostfunc, v_store : store, var_0 : val*) : hostcallresult* + +;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec +def $lift_result(v_result : result) : instr* + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{val_lst : val*}(_VALS_result(val_lst)) = $instr_val(v_val)*{v_val <- val_lst} + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result{a : nat}(`(REF.EXN_ADDR%)THROW_REF`_result(a)) = [`REF.EXN_ADDR`_instr(a) THROW_REF_instr] + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + ;; ../../../../specification/wasm-3.0/4.0-execution.configurations.spectec + def $lift_result(TRAP_result) = [TRAP_instr] + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Num_ok: `%|-%:%`(store, num, numtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule mk_Num_ok{v_s : store, nt : numtype, c : num_}: + `%|-%:%`(v_s, CONST_num(nt, c), nt) + -- wf_store: `%`(v_s,) + -- wf_num: `%`(CONST_num(nt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Vec_ok: `%|-%:%`(store, vec, vectype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule mk_Vec_ok{v_s : store, vt : vectype, c : vec_}: + `%|-%:%`(v_s, VCONST_vec(vt, c), vt) + -- wf_store: `%`(v_s,) + -- wf_vec: `%`(VCONST_vec(vt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:25.1-25.60 +relation Ref_ok: `%|-%:%`(store, ref, reftype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:35.1-36.36 + rule null{v_s : store}: + `%|-%:%`(v_s, `REF.NULL_ADDR`_ref, REF_reftype(?(NULL_null), BOT_heaptype)) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + -- wf_reftype: `%`(REF_reftype(?(NULL_null), BOT_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:38.1-39.31 + rule i31{v_s : store, i : u31}: + `%|-%:%`(v_s, `REF.I31_NUM`_ref(i), REF_reftype(?(), I31_heaptype)) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.I31_NUM`_ref(i),) + -- wf_reftype: `%`(REF_reftype(?(), I31_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:41.1-43.31 + rule struct{v_s : store, a : addr, dt : deftype}: + `%|-%:%`(v_s, `REF.STRUCT_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |v_s.STRUCTS_store|) + -- if (v_s.STRUCTS_store[a].TYPE_structinst = dt) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.STRUCT_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:45.1-47.30 + rule array{v_s : store, a : addr, dt : deftype}: + `%|-%:%`(v_s, `REF.ARRAY_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |v_s.ARRAYS_store|) + -- if (v_s.ARRAYS_store[a].TYPE_arrayinst = dt) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.ARRAY_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:49.1-51.29 + rule func{v_s : store, a : addr, dt : deftype}: + `%|-%:%`(v_s, `REF.FUNC_ADDR`_ref(a), REF_reftype(?(), $heaptype_deftype(dt))) + -- if (a < |v_s.FUNCS_store|) + -- if (v_s.FUNCS_store[a].TYPE_funcinst = dt) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.FUNC_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), $heaptype_deftype(dt)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:53.1-55.24 + rule exn{v_s : store, a : addr, exn : exninst}: + `%|-%:%`(v_s, `REF.EXN_ADDR`_ref(a), REF_reftype(?(), EXN_heaptype)) + -- if (a < |v_s.EXNS_store|) + -- if (v_s.EXNS_store[a] = exn) + -- wf_store: `%`(v_s,) + -- wf_exninst: `%`(exn,) + -- wf_ref: `%`(`REF.EXN_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), EXN_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:57.1-58.33 + rule host{v_s : store, a : addr}: + `%|-%:%`(v_s, `REF.HOST_ADDR`_ref(a), REF_reftype(?(), ANY_heaptype)) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.HOST_ADDR`_ref(a),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:60.1-63.30 + rule extern{v_s : store, v_ref : ref}: + `%|-%:%`(v_s, `REF.EXTERN`_ref(v_ref), REF_reftype(?(), EXTERN_heaptype)) + -- Ref_ok: `%|-%:%`(v_s, v_ref, REF_reftype(?(), ANY_heaptype)) + -- if (v_ref =/= `REF.NULL_ADDR`_ref) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(`REF.EXTERN`_ref(v_ref),) + -- wf_reftype: `%`(REF_reftype(?(), EXTERN_heaptype),) + -- wf_reftype: `%`(REF_reftype(?(), ANY_heaptype),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:65.1-69.34 + rule sub{v_s : store, v_ref : ref, rt : reftype, rt' : reftype}: + `%|-%:%`(v_s, v_ref, rt) + -- Ref_ok: `%|-%:%`(v_s, v_ref, rt') + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- Reftype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt', rt) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(v_ref,) + -- wf_reftype: `%`(rt,) + -- wf_reftype: `%`(rt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Val_ok: `%|-%:%`(store, val, valtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule num{v_s : store, v_num : num, nt : numtype}: + `%|-%:%`(v_s, $val_num(v_num), $valtype_numtype(nt)) + -- Num_ok: `%|-%:%`(v_s, v_num, nt) + -- wf_store: `%`(v_s,) + -- wf_num: `%`(v_num,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule vec{v_s : store, v_vec : vec, vt : vectype}: + `%|-%:%`(v_s, $val_vec(v_vec), $valtype_vectype(vt)) + -- Vec_ok: `%|-%:%`(v_s, v_vec, vt) + -- wf_store: `%`(v_s,) + -- wf_vec: `%`(v_vec,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule ref{v_s : store, v_ref : ref, rt : reftype}: + `%|-%:%`(v_s, $val_ref(v_ref), $valtype_reftype(rt)) + -- Ref_ok: `%|-%:%`(v_s, v_ref, rt) + -- wf_store: `%`(v_s,) + -- wf_ref: `%`(v_ref,) + -- wf_reftype: `%`(rt,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Packval_ok: `%|-%:%`(store, packval, packtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule mk_Packval_ok{v_s : store, pt : packtype, c : iN}: + `%|-%:%`(v_s, PACK_packval(pt, c), pt) + -- wf_store: `%`(v_s,) + -- wf_packval: `%`(PACK_packval(pt, c),) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +relation Fieldval_ok: `%|-%:%`(store, fieldval, storagetype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule val{v_s : store, v_val : val, t : valtype}: + `%|-%:%`(v_s, $fieldval_val(v_val), $storagetype_valtype(t)) + -- Val_ok: `%|-%:%`(v_s, v_val, t) + -- wf_store: `%`(v_s,) + -- wf_val: `%`(v_val,) + -- wf_valtype: `%`(t,) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec + rule packval{v_s : store, v_packval : packval, pt : packtype}: + `%|-%:%`(v_s, $fieldval_packval(v_packval), $storagetype_packtype(pt)) + -- Packval_ok: `%|-%:%`(v_s, v_packval, pt) + -- wf_store: `%`(v_s,) + -- wf_packval: `%`(v_packval,) + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:104.1-104.84 +relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:106.1-108.28 + rule tag{v_s : store, a : addr, v_taginst : taginst}: + `%|-%:%`(v_s, TAG_externaddr(a), TAG_externtype(v_taginst.TYPE_taginst)) + -- if (a < |v_s.TAGS_store|) + -- if (v_s.TAGS_store[a] = v_taginst) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(TAG_externtype(v_taginst.TYPE_taginst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:110.1-112.34 + rule global{v_s : store, a : addr, v_globalinst : globalinst}: + `%|-%:%`(v_s, GLOBAL_externaddr(a), GLOBAL_externtype(v_globalinst.TYPE_globalinst)) + -- if (a < |v_s.GLOBALS_store|) + -- if (v_s.GLOBALS_store[a] = v_globalinst) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(GLOBAL_externtype(v_globalinst.TYPE_globalinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:114.1-116.28 + rule mem{v_s : store, a : addr, v_meminst : meminst}: + `%|-%:%`(v_s, MEM_externaddr(a), MEM_externtype(v_meminst.TYPE_meminst)) + -- if (a < |v_s.MEMS_store|) + -- if (v_s.MEMS_store[a] = v_meminst) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(MEM_externtype(v_meminst.TYPE_meminst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:118.1-120.32 + rule table{v_s : store, a : addr, v_tableinst : tableinst}: + `%|-%:%`(v_s, TABLE_externaddr(a), TABLE_externtype(v_tableinst.TYPE_tableinst)) + -- if (a < |v_s.TABLES_store|) + -- if (v_s.TABLES_store[a] = v_tableinst) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(TABLE_externtype(v_tableinst.TYPE_tableinst),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:122.1-124.30 + rule func{v_s : store, a : addr, v_funcinst : funcinst}: + `%|-%:%`(v_s, FUNC_externaddr(a), FUNC_externtype($typeuse_deftype(v_funcinst.TYPE_funcinst))) + -- if (a < |v_s.FUNCS_store|) + -- if (v_s.FUNCS_store[a] = v_funcinst) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(FUNC_externtype($typeuse_deftype(v_funcinst.TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.1-execution.values.spectec:126.1-130.37 + rule sub{v_s : store, v_externaddr : externaddr, xt : externtype, xt' : externtype}: + `%|-%:%`(v_s, v_externaddr, xt) + -- Externaddr_ok: `%|-%:%`(v_s, v_externaddr, xt') + -- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt) + -- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(xt,) + -- wf_externtype: `%`(xt',) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_valtype(v_moduleinst : moduleinst, v_valtype : valtype) : valtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_valtype{v_moduleinst : moduleinst, t : valtype}(v_moduleinst, t) = $subst_all_valtype(t, (iter_val#3 : deftype <: typeuse)*{iter_val#3 <- v_moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_reftype(v_moduleinst : moduleinst, v_reftype : reftype) : reftype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_reftype{v_moduleinst : moduleinst, rt : reftype}(v_moduleinst, rt) = $subst_all_reftype(rt, (iter_val#4 : deftype <: typeuse)*{iter_val#4 <- v_moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_globaltype(v_moduleinst : moduleinst, v_globaltype : globaltype) : globaltype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_globaltype{v_moduleinst : moduleinst, gt : globaltype}(v_moduleinst, gt) = $subst_all_globaltype(gt, (iter_val#5 : deftype <: typeuse)*{iter_val#5 <- v_moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_memtype(v_moduleinst : moduleinst, v_memtype : memtype) : memtype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_memtype{v_moduleinst : moduleinst, mt : memtype}(v_moduleinst, mt) = $subst_all_memtype(mt, (iter_val#6 : deftype <: typeuse)*{iter_val#6 <- v_moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec +def $inst_tabletype(v_moduleinst : moduleinst, v_tabletype : tabletype) : tabletype + ;; ../../../../specification/wasm-3.0/4.2-execution.types.spectec + def $inst_tabletype{v_moduleinst : moduleinst, tt : tabletype}(v_moduleinst, tt) = $subst_all_tabletype(tt, (iter_val#7 : deftype <: typeuse)*{iter_val#7 <- v_moduleinst.TYPES_moduleinst}) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_pure: `%~>%`(instr*, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unreachable: + `%~>%`([UNREACHABLE_instr], [TRAP_instr]) + -- wf_instr: `%`(UNREACHABLE_instr,) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule nop: + `%~>%`([NOP_instr], []) + -- wf_instr: `%`(NOP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule drop{v_val : val}: + `%~>%`([$instr_val(v_val) DROP_instr], []) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(DROP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule select_true{val_1 : val, val_2 : val, c : num_, t_lst_opt : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t_lst_opt)], [$instr_val(val_1)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t_lst_opt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule select_false{val_1 : val, val_2 : val, c : num_, t_lst_opt : valtype*?}: + `%~>%`([$instr_val(val_1) $instr_val(val_2) CONST_instr(I32_numtype, c) SELECT_instr(t_lst_opt)], [$instr_val(val_2)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_val: `%`(val_1,) + -- wf_val: `%`(val_2,) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(SELECT_instr(t_lst_opt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule if_true{c : num_, bt : blocktype, instr_1_lst : instr*, instr_2_lst : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst)], [BLOCK_instr(bt, instr_1_lst)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_1_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule if_false{c : num_, bt : blocktype, instr_1_lst : instr*, instr_2_lst : instr*}: + `%~>%`([CONST_instr(I32_numtype, c) `IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst)], [BLOCK_instr(bt, instr_2_lst)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(`IF%%ELSE%`_instr(bt, instr_1_lst, instr_2_lst),) + -- wf_instr: `%`(BLOCK_instr(bt, instr_2_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule label_vals{v_n : n, instr_lst : instr*, val_lst : val*}: + `%~>%`([`LABEL_%{%}%`_instr(v_n, instr_lst, $instr_val(v_val)*{v_val <- val_lst})], $instr_val(v_val)*{v_val <- val_lst}) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr_lst, $instr_val(v_val)*{v_val <- val_lst}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_label_zero{v_n : n, instr'_lst : instr*, val'_lst : val*, val_lst : val*, l : labelidx, instr_lst : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst)], $instr_val(v_val)^v_n{v_val <- val_lst} ++ instr'_lst) + -- if ($proj_uN_0(l).0 = 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_label_succ{v_n : n, instr'_lst : instr*, val_lst : val*, l : labelidx, instr_lst : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst)], $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))]) + -- if ($proj_uN_0(l).0 > 0) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst),) + -- wf_instr: `%`(BR_instr(`%`_labelidx(((($proj_uN_0(l).0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_handler{v_n : n, catch_lst : catch*, val_lst : val*, l : labelidx, instr_lst : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst)], $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)] ++ instr_lst),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_if_true{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], [BR_instr(l)]) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 =/= 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_if_false{c : num_, l : labelidx}: + `%~>%`([CONST_instr(I32_numtype, c) BR_IF_instr(l)], []) + -- if ($proj_num__0(c) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(c))).0 = 0) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_instr: `%`(BR_IF_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_table_lt{i : num_, l_lst : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l_lst, l')], [BR_instr(l_lst[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |l_lst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l_lst, l'),) + -- wf_instr: `%`(BR_instr(l_lst[$proj_uN_0(!($proj_num__0(i))).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_table_ge{i : num_, l_lst : labelidx*, l' : labelidx}: + `%~>%`([CONST_instr(I32_numtype, i) BR_TABLE_instr(l_lst, l')], [BR_instr(l')]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |l_lst|) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(BR_TABLE_instr(l_lst, l'),) + -- wf_instr: `%`(BR_instr(l'),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_null_null{v_val : val, l : labelidx}: + `%~>%`([$instr_val(v_val) BR_ON_NULL_instr(l)], [BR_instr(l)]) + -- if (v_val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_null_addr{v_val : val, l : labelidx}: + `%~>%`([$instr_val(v_val) BR_ON_NULL_instr(l)], [$instr_val(v_val)]) + -- if (v_val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(BR_ON_NULL_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_non_null_null{v_val : val, l : labelidx}: + `%~>%`([$instr_val(v_val) BR_ON_NON_NULL_instr(l)], []) + -- if (v_val = `REF.NULL_ADDR`_val) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_val: `%`(`REF.NULL_ADDR`_val,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_non_null_addr{v_val : val, l : labelidx}: + `%~>%`([$instr_val(v_val) BR_ON_NON_NULL_instr(l)], [$instr_val(v_val) BR_instr(l)]) + -- if (v_val =/= `REF.NULL_ADDR`_val) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(BR_ON_NON_NULL_instr(l),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call_indirect{x : idx, yy : typeuse}: + `%~>%`([CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) CALL_REF_instr(yy)]) + -- wf_instr: `%`(CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_indirect{x : idx, yy : typeuse}: + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [`TABLE.GET`_instr(x) `REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))) RETURN_CALL_REF_instr(yy)]) + -- wf_instr: `%`(RETURN_CALL_INDIRECT_instr(x, yy),) + -- wf_instr: `%`(`TABLE.GET`_instr(x),) + -- wf_instr: `%`(`REF.CAST`_instr(REF_reftype(?(NULL_null), $heaptype_typeuse(yy))),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule frame_vals{v_n : n, v_f : frame, val_lst : val*}: + `%~>%`([`FRAME_%{%}%`_instr(v_n, v_f, $instr_val(v_val)^v_n{v_val <- val_lst})], $instr_val(v_val)^v_n{v_val <- val_lst}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(v_n, v_f, $instr_val(v_val)^v_n{v_val <- val_lst}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_frame{v_n : n, v_f : frame, val'_lst : val*, val_lst : val*, instr_lst : instr*}: + `%~>%`([`FRAME_%{%}%`_instr(v_n, v_f, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst)], $instr_val(v_val)^v_n{v_val <- val_lst}) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(v_n, v_f, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_label{v_n : n, instr'_lst : instr*, val_lst : val*, instr_lst : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst)], $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_handler{v_n : n, catch_lst : catch*, val_lst : val*, instr_lst : instr*}: + `%~>%`([`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst)], $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_instr] ++ instr_lst),) + -- wf_instr: `%`(RETURN_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule handler_vals{v_n : n, catch_lst : catch*, val_lst : val*}: + `%~>%`([`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst})], $instr_val(v_val)*{v_val <- val_lst}) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, $instr_val(v_val)*{v_val <- val_lst}),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule trap_instrs{val_lst : val*, instr_lst : instr*}: + `%~>%`($instr_val(v_val)*{v_val <- val_lst} ++ [TRAP_instr] ++ instr_lst, [TRAP_instr]) + -- if ((val_lst =/= []) \/ (instr_lst =/= [])) + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule trap_label{v_n : n, instr'_lst : instr*}: + `%~>%`([`LABEL_%{%}%`_instr(v_n, instr'_lst, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr'_lst, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule trap_handler{v_n : n, catch_lst : catch*}: + `%~>%`([`HANDLER_%{%}%`_instr(v_n, catch_lst, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule trap_frame{v_n : n, v_f : frame}: + `%~>%`([`FRAME_%{%}%`_instr(v_n, v_f, [TRAP_instr])], [TRAP_instr]) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(v_n, v_f, [TRAP_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule local_tee{v_val : val, x : idx}: + `%~>%`([$instr_val(v_val) `LOCAL.TEE`_instr(x)], [$instr_val(v_val) $instr_val(v_val) `LOCAL.SET`_instr(x)]) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(`LOCAL.TEE`_instr(x),) + -- wf_instr: `%`(`LOCAL.SET`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_i31{i : num_}: + `%~>%`([CONST_instr(I32_numtype, i) `REF.I31`_instr], [`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i))))]) + -- if ($proj_num__0(i) =/= ?()) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`REF.I31`_instr,) + -- wf_instr: `%`(`REF.I31_NUM`_instr($wrap__(32, 31, !($proj_num__0(i)))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_is_null_true{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (v_ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(v_ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_is_null_false{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `REF.IS_NULL`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (v_ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(v_ref,) + -- wf_instr: `%`(`REF.IS_NULL`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_as_non_null_null{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `REF.AS_NON_NULL`_instr], [TRAP_instr]) + -- if (v_ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(v_ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_ref: `%`(`REF.NULL_ADDR`_ref,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_as_non_null_addr{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `REF.AS_NON_NULL`_instr], [$instr_ref(v_ref)]) + -- if (v_ref =/= `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(v_ref,) + -- wf_instr: `%`(`REF.AS_NON_NULL`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_eq_true{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- if (ref_1 = ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_eq_false{ref_1 : ref, ref_2 : ref}: + `%~>%`([$instr_ref(ref_1) $instr_ref(ref_2) `REF.EQ`_instr], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- if (ref_1 =/= ref_2) + -- wf_ref: `%`(ref_1,) + -- wf_ref: `%`(ref_2,) + -- wf_instr: `%`(`REF.EQ`_instr,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule i31_get_null{v_sx : sx}: + `%~>%`([`REF.NULL_ADDR`_instr `I31.GET`_instr(v_sx)], [TRAP_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`I31.GET`_instr(v_sx),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule i31_get_num{i : u31, v_sx : sx}: + `%~>%`([`REF.I31_NUM`_instr(i) `I31.GET`_instr(v_sx)], [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, v_sx, i)))]) + -- wf_instr: `%`(`REF.I31_NUM`_instr(i),) + -- wf_instr: `%`(`I31.GET`_instr(v_sx),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, $extend__(31, 32, v_sx, i))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new{v_val : val, v_n : n, x : idx}: + `%~>%`([$instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW`_instr(x)], $instr_val(v_val)^v_n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]) + -- wf_val: `%`(v_val,) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))),) + -- wf_instr: `%`(`ARRAY.NEW`_instr(x),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule extern_convert_any_null{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `EXTERN.CONVERT_ANY`_instr], [`REF.NULL_ADDR`_instr]) + -- if (v_ref = `REF.NULL_ADDR`_ref) + -- wf_ref: `%`(v_ref,) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule extern_convert_any_addr{v_ref : ref}: + `%~>%`([$instr_ref(v_ref) `EXTERN.CONVERT_ANY`_instr], [`REF.EXTERN`_instr(v_ref)]) + -- if (v_ref =/= `REF.NULL_ADDR`_ref) + -- wf_instr: `%`(`EXTERN.CONVERT_ANY`_instr,) + -- wf_instr: `%`(`REF.EXTERN`_instr(v_ref),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule any_convert_extern_null: + `%~>%`([`REF.NULL_ADDR`_instr `ANY.CONVERT_EXTERN`_instr], [`REF.NULL_ADDR`_instr]) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule any_convert_extern_addr{v_ref : ref}: + `%~>%`([`REF.EXTERN`_instr(v_ref) `ANY.CONVERT_EXTERN`_instr], [$instr_ref(v_ref)]) + -- wf_instr: `%`(`REF.EXTERN`_instr(v_ref),) + -- wf_instr: `%`(`ANY.CONVERT_EXTERN`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unop_val{nt : numtype, c_1 : num_, unop : unop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [CONST_instr(nt, c)]) + -- if (|$fun_unop_(nt, unop, c_1)| > 0) + -- if (c <- $fun_unop_(nt, unop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule unop_trap{nt : numtype, c_1 : num_, unop : unop_}: + `%~>%`([CONST_instr(nt, c_1) UNOP_instr(nt, unop)], [TRAP_instr]) + -- if ($fun_unop_(nt, unop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(UNOP_instr(nt, unop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule binop_val{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [CONST_instr(nt, c)]) + -- if (|$fun_binop_(nt, binop, c_1, c_2)| > 0) + -- if (c <- $fun_binop_(nt, binop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule binop_trap{nt : numtype, c_1 : num_, c_2 : num_, binop : binop_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) BINOP_instr(nt, binop)], [TRAP_instr]) + -- if ($fun_binop_(nt, binop, c_1, c_2) = []) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(BINOP_instr(nt, binop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule testop{nt : numtype, c_1 : num_, testop : testop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) TESTOP_instr(nt, testop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $fun_testop_(nt, testop, c_1)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(TESTOP_instr(nt, testop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule relop{nt : numtype, c_1 : num_, c_2 : num_, relop : relop_, c : num_}: + `%~>%`([CONST_instr(nt, c_1) CONST_instr(nt, c_2) RELOP_instr(nt, relop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $fun_relop_(nt, relop, c_1, c_2)) + -- wf_instr: `%`(CONST_instr(nt, c_1),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_instr: `%`(RELOP_instr(nt, relop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule cvtop_val{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__, c : num_}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [CONST_instr(nt_2, c)]) + -- if (|$fun_cvtop__(nt_1, nt_2, cvtop, c_1)| > 0) + -- if (c <- $fun_cvtop__(nt_1, nt_2, cvtop, c_1)) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(CONST_instr(nt_2, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule cvtop_trap{nt_1 : numtype, c_1 : num_, nt_2 : numtype, cvtop : cvtop__}: + `%~>%`([CONST_instr(nt_1, c_1) CVTOP_instr(nt_2, nt_1, cvtop)], [TRAP_instr]) + -- if ($fun_cvtop__(nt_1, nt_2, cvtop, c_1) = []) + -- wf_instr: `%`(CONST_instr(nt_1, c_1),) + -- wf_instr: `%`(CVTOP_instr(nt_2, nt_1, cvtop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvunop{c_1 : vec_, v_vvunop : vvunop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVUNOP_instr(V128_vectype, v_vvunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvunop_(V128_vectype, v_vvunop, c_1)| > 0) + -- if (c <- $vvunop_(V128_vectype, v_vvunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVUNOP_instr(V128_vectype, v_vvunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvbinop{c_1 : vec_, c_2 : vec_, v_vvbinop : vvbinop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VVBINOP_instr(V128_vectype, v_vvbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvbinop_(V128_vectype, v_vvbinop, c_1, c_2)| > 0) + -- if (c <- $vvbinop_(V128_vectype, v_vvbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VVBINOP_instr(V128_vectype, v_vvbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, v_vvternop : vvternop, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VVTERNOP_instr(V128_vectype, v_vvternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$vvternop_(V128_vectype, v_vvternop, c_1, c_2, c_3)| > 0) + -- if (c <- $vvternop_(V128_vectype, v_vvternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VVTERNOP_instr(V128_vectype, v_vvternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vvtestop{c_1 : vec_, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $inez_($vsize(V128_vectype), c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vunop_val{c_1 : vec_, sh : shape, vunop : vunop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$fun_vunop_(sh, vunop, c_1)| > 0) + -- if (c <- $fun_vunop_(sh, vunop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vunop_trap{c_1 : vec_, sh : shape, vunop : vunop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VUNOP_instr(sh, vunop)], [TRAP_instr]) + -- if ($fun_vunop_(sh, vunop, c_1) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VUNOP_instr(sh, vunop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbinop_val{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$fun_vbinop_(sh, vbinop, c_1, c_2)| > 0) + -- if (c <- $fun_vbinop_(sh, vbinop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbinop_trap{c_1 : vec_, c_2 : vec_, sh : shape, vbinop : vbinop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VBINOP_instr(sh, vbinop)], [TRAP_instr]) + -- if ($fun_vbinop_(sh, vbinop, c_1, c_2) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VBINOP_instr(sh, vbinop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vternop_val{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [VCONST_instr(V128_vectype, c)]) + -- if (|$fun_vternop_(sh, vternop, c_1, c_2, c_3)| > 0) + -- if (c <- $fun_vternop_(sh, vternop, c_1, c_2, c_3)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vternop_trap{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh : shape, vternop : vternop_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VTERNOP_instr(sh, vternop)], [TRAP_instr]) + -- if ($fun_vternop_(sh, vternop, c_1, c_2, c_3) = []) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VTERNOP_instr(sh, vternop),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vtestop{c_1 : vec_, v_Jnn : Jnn, v_M : M, c : num_, i_lst : lane_*}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VTESTOP_instr(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), mk_vtestop__0_vtestop_(v_Jnn, v_M, ALL_TRUE_vtestop_Jnn_M))], [CONST_instr(I32_numtype, c)]) + -- if (i_lst = $lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c_1)) + -- if ($proj_num__0(c) =/= ?()) + -- (if ($proj_lane__2(i) =/= ?()))*{i <- i_lst} + -- if ($proj_uN_0(!($proj_num__0(c))).0 = $prod($proj_uN_0($inez_($jsizenn(v_Jnn), !($proj_lane__2(i)))).0*{i <- i_lst})) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M)), i))*{i <- i_lst} + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VTESTOP_instr(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), mk_vtestop__0_vtestop_(v_Jnn, v_M, ALL_TRUE_vtestop_Jnn_M)),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vrelop{c_1 : vec_, c_2 : vec_, sh : shape, vrelop : vrelop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VRELOP_instr(sh, vrelop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $fun_vrelop_(sh, vrelop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VRELOP_instr(sh, vrelop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshiftop{c_1 : vec_, i : num_, sh : ishape, vshiftop : vshiftop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr(I32_numtype, i) VSHIFTOP_instr(sh, vshiftop)], [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (c = $fun_vshiftop_(sh, vshiftop, c_1, !($proj_num__0(i)))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(VSHIFTOP_instr(sh, vshiftop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vbitmask{c_1 : vec_, sh : ishape, c : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VBITMASK_instr(sh)], [CONST_instr(I32_numtype, c)]) + -- if ($proj_num__0(c) =/= ?()) + -- if (!($proj_num__0(c)) = $vbitmaskop_(sh, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VBITMASK_instr(sh),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vswizzlop{c_1 : vec_, c_2 : vec_, sh : bshape, swizzlop : vswizzlop_, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSWIZZLOP_instr(sh, swizzlop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $fun_vswizzlop_(sh, swizzlop, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSWIZZLOP_instr(sh, swizzlop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vshuffle{c_1 : vec_, c_2 : vec_, sh : bshape, i_lst : laneidx*, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VSHUFFLE_instr(sh, i_lst)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vshufflop_(sh, i_lst, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VSHUFFLE_instr(sh, i_lst),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vsplat{v_Lnn : Lnn, c_1 : num_, v_M : M, c : vec_}: + `%~>%`([CONST_instr($lunpack(v_Lnn), c_1) VSPLAT_instr(`%X%`_shape(v_Lnn, v_M))], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(v_Lnn, v_M), $lpacknum_(v_Lnn, c_1)^$proj_dim_0(v_M).0{})) + -- wf_instr: `%`(CONST_instr($lunpack(v_Lnn), c_1),) + -- wf_instr: `%`(VSPLAT_instr(`%X%`_shape(v_Lnn, v_M)),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(v_Lnn, v_M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextract_lane_num{c_1 : vec_, nt : numtype, v_M : M, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), v_M), ?(), i)], [CONST_instr(nt, c_2)]) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_numtype(nt), v_M), c_1)|) + -- if (mk_lane__0_lane_(nt, c_2) = $lanes_(`%X%`_shape($lanetype_numtype(nt), v_M), c_1)[$proj_uN_0(i).0]) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_numtype(nt), v_M), ?(), i),) + -- wf_instr: `%`(CONST_instr(nt, c_2),) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_numtype(nt), v_M)), mk_lane__0_lane_(nt, c_2)) + -- wf_shape: `%`(`%X%`_shape($lanetype_numtype(nt), v_M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextract_lane_pack{c_1 : vec_, pt : packtype, v_M : M, v_sx : sx, i : laneidx, c_2 : num_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), v_M), ?(v_sx), i)], [CONST_instr(I32_numtype, c_2)]) + -- if ($proj_num__0(c_2) =/= ?()) + -- if ($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), v_M), c_1)[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |$lanes_(`%X%`_shape($lanetype_packtype(pt), v_M), c_1)|) + -- if (!($proj_num__0(c_2)) = $extend__($psize(pt), 32, v_sx, !($proj_lane__1($lanes_(`%X%`_shape($lanetype_packtype(pt), v_M), c_1)[$proj_uN_0(i).0])))) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTRACT_LANE_instr(`%X%`_shape($lanetype_packtype(pt), v_M), ?(v_sx), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, c_2),) + -- wf_shape: `%`(`%X%`_shape($lanetype_packtype(pt), v_M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vreplace_lane{c_1 : vec_, v_Lnn : Lnn, c_2 : num_, v_M : M, i : laneidx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) CONST_instr($lunpack(v_Lnn), c_2) VREPLACE_LANE_instr(`%X%`_shape(v_Lnn, v_M), i)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $inv_lanes_(`%X%`_shape(v_Lnn, v_M), $lanes_(`%X%`_shape(v_Lnn, v_M), c_1)[[$proj_uN_0(i).0] = $lpacknum_(v_Lnn, c_2)])) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(CONST_instr($lunpack(v_Lnn), c_2),) + -- wf_instr: `%`(VREPLACE_LANE_instr(`%X%`_shape(v_Lnn, v_M), i),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape(v_Lnn, v_M),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextunop{c_1 : vec_, sh_2 : ishape, sh_1 : ishape, vextunop : vextunop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VEXTUNOP_instr(sh_2, sh_1, vextunop)], [VCONST_instr(V128_vectype, c)]) + -- if ($fun_vextunop__(sh_1, sh_2, vextunop, c_1) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VEXTUNOP_instr(sh_2, sh_1, vextunop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextbinop{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, vextbinop : vextbinop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VEXTBINOP_instr(sh_2, sh_1, vextbinop)], [VCONST_instr(V128_vectype, c)]) + -- if ($fun_vextbinop__(sh_1, sh_2, vextbinop, c_1, c_2) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VEXTBINOP_instr(sh_2, sh_1, vextbinop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vextternop{c_1 : vec_, c_2 : vec_, c_3 : vec_, sh_2 : ishape, sh_1 : ishape, vextternop : vextternop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VCONST_instr(V128_vectype, c_3) VEXTTERNOP_instr(sh_2, sh_1, vextternop)], [VCONST_instr(V128_vectype, c)]) + -- if ($fun_vextternop__(sh_1, sh_2, vextternop, c_1, c_2, c_3) = c) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_3),) + -- wf_instr: `%`(VEXTTERNOP_instr(sh_2, sh_1, vextternop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vnarrow{c_1 : vec_, c_2 : vec_, sh_2 : ishape, sh_1 : ishape, v_sx : sx, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCONST_instr(V128_vectype, c_2) VNARROW_instr(sh_2, sh_1, v_sx)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $vnarrowop__($proj_ishape_0(sh_1).0, $proj_ishape_0(sh_2).0, v_sx, c_1, c_2)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_2),) + -- wf_instr: `%`(VNARROW_instr(sh_2, sh_1, v_sx),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vcvtop{c_1 : vec_, sh_2 : shape, sh_1 : shape, vcvtop : vcvtop__, c : vec_}: + `%~>%`([VCONST_instr(V128_vectype, c_1) VCVTOP_instr(sh_2, sh_1, vcvtop)], [VCONST_instr(V128_vectype, c)]) + -- if (c = $fun_vcvtop__(sh_1, sh_2, vcvtop, c_1)) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c_1),) + -- wf_instr: `%`(VCVTOP_instr(sh_2, sh_1, vcvtop),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +def $blocktype_(v_state : state, v_blocktype : blocktype) : instrtype + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, x : uN, t_1_lst : valtype*, t_2_lst : valtype*}(z, _IDX_blocktype(x)) = `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)) + -- Expand: `%~~%`($fun_type(z, x), `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + def $blocktype_{z : state, t_opt : valtype?}(z, _RESULT_blocktype(t_opt)) = `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t_opt),)) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(lift(t_opt),)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_br_on_cast_fail: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_succeed_0{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_br_on_cast_fail_fail: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_fail_succeed_0{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_throw_ref_handler_next: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_all_ref_0{z : state, v_n : n, l : labelidx, catch'_lst : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_REF_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_REF_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_all_0{z : state, v_n : n, l : labelidx, catch'_lst : catch*, a : addr}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_ref_0{z : state, v_n : n, x : idx, l : labelidx, catch'_lst : catch*, a : addr, val_lst : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_REF_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val_lst = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_REF_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_0{z : state, v_n : n, x : idx, l : labelidx, catch'_lst : catch*, a : addr, val_lst : val*}: + `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val_lst = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_table_fill_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_fill_oob_0{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_table_copy_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_oob_0{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_table_copy_le: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_zero_0{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ Step_read_before_table_copy_zero: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_oob_1{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_table_copy_gt: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_le_0{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ Step_read_before_table_copy_le: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_zero_1{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- ~ Step_read_before_table_copy_zero: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_oob_2{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_table_init_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_init_oob_0{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_memory_fill_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_fill_oob_0{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_memory_copy_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_oob_0{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_memory_copy_le: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_zero_0{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- ~ Step_read_before_memory_copy_zero: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_oob_1{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_memory_init_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_init_oob_0{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_ref_test_false: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_test_true_0{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_ref_cast_fail: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_cast_succeed_0{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)])) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)]),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_fill_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_fill_oob_0{z : state, a : addr, i : num_, v_val : val, v_n : n, x : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_copy_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob2_0{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob1_0{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_copy_le: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_zero_0{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ Step_read_before_array_copy_zero: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob2_1{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob1_1{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_copy_gt: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_le_0{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx, sx_opt : sx?, mut_opt : mut?, zt_2 : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ Step_read_before_array_copy_le: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($fun_type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2))) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx_opt = $fun_sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx_opt, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_zero_1{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- ~ Step_read_before_array_copy_zero: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob2_2{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob1_2{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_init_elem_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_oob2_0{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_oob1_0{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_init_data_zero: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob2_0{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx, mut_opt : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((v_n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob1_0{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read_before_array_init_data_num: `%`(config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_zero_0{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- ~ Step_read_before_array_init_data_zero: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob2_1{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx, mut_opt : mut?, zt : storagetype}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((v_n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob1_1{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Step_read: `%~>%`(config, instr*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule block{z : state, v_m : m, val_lst : val*, bt : blocktype, instr_lst : instr*, v_n : n, t_1_lst : valtype*, t_2_lst : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [BLOCK_instr(bt, instr_lst)]), [`LABEL_%{%}%`_instr(v_n, [], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst)]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [BLOCK_instr(bt, instr_lst)]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, [], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule loop{z : state, v_m : m, val_lst : val*, bt : blocktype, instr_lst : instr*, t_1_lst : valtype*, v_n : n, t_2_lst : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [LOOP_instr(bt, instr_lst)]), [`LABEL_%{%}%`_instr(v_m, [LOOP_instr(bt, instr_lst)], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst)]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [LOOP_instr(bt, instr_lst)]),) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_m, [LOOP_instr(bt, instr_lst)], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_succeed{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(v_ref) BR_instr(l)]) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_fail{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)]), [$instr_ref(v_ref)]) + -- ~ Step_read_before_br_on_cast_fail: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_fail_succeed{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(v_ref)]) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt_2)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule br_on_cast_fail_fail{v_s : store, v_f : frame, v_ref : ref, l : labelidx, rt_1 : reftype, rt_2 : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]), [$instr_ref(v_ref) BR_instr(l)]) + -- ~ Step_read_before_br_on_cast_fail_fail: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) BR_ON_CAST_FAIL_instr(l, rt_1, rt_2)]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call{z : state, x : idx, a : addr}: + `%~>%`(`%;%`_config(z, [RETURN_CALL_instr(x)]), [`REF.FUNC_ADDR`_instr(a) RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst))]) + -- if (a < |$s(z).FUNCS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- if ($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0] = a) + -- wf_config: `%`(`%;%`_config(z, [RETURN_CALL_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(RETURN_CALL_REF_instr($typeuse_deftype($s(z).FUNCS_store[a].TYPE_funcinst)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_ref_label{z : state, k : n, instr'_lst : instr*, val_lst : val*, yy : typeuse, instr_lst : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]), $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(k, instr'_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_ref_handler{z : state, k : n, catch_lst : catch*, val_lst : val*, yy : typeuse, instr_lst : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]), $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(k, catch_lst, $instr_val(v_val)*{v_val <- val_lst} ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]),) + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_ref_frame_null{z : state, k : n, v_f : frame, val_lst : val*, yy : typeuse, instr_lst : instr*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, v_f, $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, v_f, $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.NULL_ADDR`_instr] ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule return_call_ref_frame_addr{z : state, k : n, v_f : frame, val'_lst : val*, v_n : n, val_lst : val*, a : addr, yy : typeuse, instr_lst : instr*, t_1_lst : valtype*, v_m : m, t_2_lst : valtype*}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, v_f, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]) + -- if (a < |$s(z).FUNCS_store|) + -- Expand: `%~~%`($s(z).FUNCS_store[a].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(k, v_f, $instr_val(val')*{val' <- val'_lst} ++ $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a)] ++ [RETURN_CALL_REF_instr(yy)] ++ instr_lst)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr(a),) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_null{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr THROW_REF_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_instrs{z : state, val_lst : val*, a : addr, instr_lst : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr_lst), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- if ((val_lst =/= []) \/ (instr_lst =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.EXN_ADDR`_instr(a)] ++ [THROW_REF_instr] ++ instr_lst),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_label{z : state, v_n : n, instr'_lst : instr*, a : addr}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(v_n, instr'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(v_n, instr'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_frame{z : state, v_n : n, v_f : frame, a : addr}: + `%~>%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(v_n, v_f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(v_n, v_f, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_empty{z : state, v_n : n, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [], [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(THROW_REF_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch{z : state, v_n : n, x : idx, l : labelidx, catch'_lst : catch*, a : addr, val_lst : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(v_val)*{v_val <- val_lst} ++ [BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val_lst = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_ref{z : state, v_n : n, x : idx, l : labelidx, catch'_lst : catch*, a : addr, val_lst : val*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_REF_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- if (a < |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if ($s(z).EXNS_store[a].TAG_exninst = $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0]) + -- if (val_lst = $s(z).EXNS_store[a].FIELDS_exninst) + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_REF_catch(x, l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_all{z : state, v_n : n, l : labelidx, catch'_lst : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_catch_all_ref{z : state, v_n : n, l : labelidx, catch'_lst : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_REF_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`REF.EXN_ADDR`_instr(a) BR_instr(l)]) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [CATCH_ALL_REF_catch(l)] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`REF.EXN_ADDR`_instr(a),) + -- wf_instr: `%`(BR_instr(l),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule throw_ref_handler_next{z : state, v_n : n, v_catch : catch, catch'_lst : catch*, a : addr}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [v_catch] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]), [`HANDLER_%{%}%`_instr(v_n, catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]) + -- ~ Step_read_before_throw_ref_handler_next: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [v_catch] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])])) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, [v_catch] ++ catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch'_lst, [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule try_table{z : state, v_m : m, val_lst : val*, bt : blocktype, catch_lst : catch*, instr_lst : instr*, v_n : n, t_1_lst : valtype*, t_2_lst : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [TRY_TABLE_instr(bt, `%`_list(catch_lst,), instr_lst)]), [`HANDLER_%{%}%`_instr(v_n, catch_lst, [`LABEL_%{%}%`_instr(v_n, [], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst)])]) + -- if ($blocktype_(z, bt) = `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_m{v_val <- val_lst} ++ [TRY_TABLE_instr(bt, `%`_list(catch_lst,), instr_lst)]),) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, [`LABEL_%{%}%`_instr(v_n, [], $instr_val(v_val)^v_m{v_val <- val_lst} ++ instr_lst)]),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule local_get{z : state, x : idx, v_val : val}: + `%~>%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]), [$instr_val(v_val)]) + -- if ($fun_local(z, x) = ?(v_val)) + -- wf_val: `%`(v_val,) + -- wf_config: `%`(`%;%`_config(z, [`LOCAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule global_get{z : state, x : idx, v_val : val}: + `%~>%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]), [$instr_val(v_val)]) + -- if ($fun_global(z, x).VALUE_globalinst = v_val) + -- wf_val: `%`(v_val,) + -- wf_config: `%`(`%;%`_config(z, [`GLOBAL.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_get_oob{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_get_val{z : state, at : addrtype, i : num_, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]), [$instr_ref($fun_table(z, x).REFS_tableinst[$proj_uN_0(!($proj_num__0(i))).0])]) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$fun_table(z, x).REFS_tableinst|) + -- if ($proj_num__0(i) =/= ?()) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) `TABLE.GET`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_size{z : state, x : idx, at : addrtype, v_n : n, lim : limits, rt : reftype}: + `%~>%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,)))]) + -- if (|$fun_table(z, x).REFS_tableinst| = v_n) + -- if ($fun_table(z, x).TYPE_tableinst = `%%%`_tabletype(at, lim, rt)) + -- wf_config: `%`(`%;%`_config(z, [`TABLE.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))),) + -- wf_tabletype: `%`(`%%%`_tabletype(at, lim, rt),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_fill_oob{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_fill_zero{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_table(z, x).REFS_tableinst|) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_fill_succ{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_oob{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_table(z, x_1).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_table(z, x_2).REFS_tableinst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_zero{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]), []) + -- ~ Step_read_before_table_copy_zero: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_le{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ Step_read_before_table_copy_le: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_copy_gt{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.GET`_instr(y) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.COPY`_instr(x, y)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ Step_read_before_table_copy_gt: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `TABLE.COPY`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.GET`_instr(y),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.COPY`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_init_oob{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_table(z, x).REFS_tableinst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_init_zero{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_elem(z, y).REFS_eleminst|)) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule table_init_succ{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) $instr_ref($fun_elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) `TABLE.SET`_instr(x) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `TABLE.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$fun_elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_table(z, x).REFS_tableinst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_elem(z, y).REFS_eleminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(`TABLE.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule load_num_oob{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule load_num_val{z : state, at : addrtype, i : num_, nt : numtype, x : idx, ao : memarg, c : num_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]), [CONST_instr(nt, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($nbytes_(nt, c) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr(nt, ?(), x, ao)]),) + -- wf_instr: `%`(CONST_instr(nt, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule load_pack_oob{z : state, at : addrtype, i : num_, v_Inn : Inn, v_n : n, v_sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_n,), v_sx))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_n,), v_sx))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule load_pack_val{z : state, at : addrtype, i : num_, v_Inn : Inn, v_n : n, v_sx : sx, x : idx, ao : memarg, c : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_n,), v_sx))), x, ao)]), [CONST_instr($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, $extend__(v_n, $size($numtype_addrtype(v_Inn)), v_sx, c)))]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(v_n, c) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((v_n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) LOAD_instr($numtype_addrtype(v_Inn), ?(mk_loadop__0_loadop_(v_Inn, `%_%`_loadop_Inn(`%`_sz(v_n,), v_sx))), x, ao)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(v_Inn), mk_num__0_num_(v_Inn, $extend__(v_n, $size($numtype_addrtype(v_Inn)), v_sx, c))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_num_oob{z : state, at : addrtype, i : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_num_val{z : state, at : addrtype, i : num_, x : idx, ao : memarg, c : vec_}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($vbytes_(V128_vectype, c) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_pack_oob{z : state, at : addrtype, i : num_, v_K : K, v_M : M, v_sx : sx, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_K,), v_M, v_sx)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((v_K * $proj_dim_0(v_M).0) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_K,), v_M, v_sx)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_pack_val{z : state, at : addrtype, i : num_, v_K : K, v_M : M, v_sx : sx, x : idx, ao : memarg, c : vec_, j_lst : iN*, v_Jnn : Jnn}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_K,), v_M, v_sx)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- (if ($proj_num__0(i) =/= ?()))^(k<$proj_dim_0(v_M).0){} + -- (if ($ibytes_(v_K, j) = $fun_mem(z, x).BYTES_meminst[(($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((((k * v_K) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) : (((v_K : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]))^(k<$proj_dim_0(v_M).0){j <- j_lst} + -- if ((c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), mk_lane__2_lane_(v_Jnn, $extend__(v_K, $jsizenn(v_Jnn), v_sx, j))^$proj_dim_0(v_M).0{j <- j_lst})) /\ ($jsizenn(v_Jnn) = (v_K * 2))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(v_K,), v_M, v_sx)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M),) + -- (wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M)), mk_lane__2_lane_(v_Jnn, $extend__(v_K, $jsizenn(v_Jnn), v_sx, j))))^$proj_dim_0(v_M).0{j <- j_lst} + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_splat_oob{z : state, at : addrtype, i : num_, v_N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_splat_val{z : state, at : addrtype, i : num_, v_N : N, x : idx, ao : memarg, c : vec_, j : iN, v_Jnn : Jnn, v_M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(v_N, j) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (v_N = $jsize(v_Jnn)) + -- if (($proj_dim_0(v_M).0 : nat <:> rat) = ((128 : nat <:> rat) / (v_N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), mk_lane__2_lane_(v_Jnn, `%`_uN($proj_uN_0(j).0,))^$proj_dim_0(v_M).0{})) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(v_N,))), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M),) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M)), mk_lane__2_lane_(v_Jnn, `%`_uN($proj_uN_0(j).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_zero_oob{z : state, at : addrtype, i : num_, v_N : N, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, ao)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, ao)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_zero_val{z : state, at : addrtype, i : num_, v_N : N, x : idx, ao : memarg, c : vec_, j : iN}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, ao)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(v_N, j) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (c = $extend__(v_N, 128, U_sx, j)) + -- wf_uN: `%%`(v_N, j) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(v_N,),)), x, ao)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_lane_oob{z : state, at : addrtype, i : num_, c_1 : vec_, v_N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule vload_lane_val{z : state, at : addrtype, i : num_, c_1 : vec_, v_N : N, x : idx, ao : memarg, j : laneidx, c : vec_, k : iN, v_Jnn : Jnn, v_M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]), [VCONST_instr(V128_vectype, c)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($ibytes_(v_N, k) = $fun_mem(z, x).BYTES_meminst[($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) : (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- if (v_N = $jsize(v_Jnn)) + -- if (($proj_dim_0(v_M).0 : nat <:> rat) = (($vsize(V128_vectype) : nat <:> rat) / (v_N : nat <:> rat))) + -- if (c = $inv_lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), $lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c_1)[[$proj_uN_0(j).0] = mk_lane__2_lane_(v_Jnn, `%`_uN($proj_uN_0(k).0,))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c_1) VLOAD_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]),) + -- wf_instr: `%`(VCONST_instr(V128_vectype, c),) + -- wf_shape: `%`(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M),) + -- wf_lane_: `%%`($fun_lanetype(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M)), mk_lane__2_lane_(v_Jnn, `%`_uN($proj_uN_0(k).0,))) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_size{z : state, x : idx, at : addrtype, v_n : n, lim : limits}: + `%~>%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,)))]) + -- if ((v_n * (64 * $Ki)) = |$fun_mem(z, x).BYTES_meminst|) + -- if ($fun_mem(z, x).TYPE_meminst = `%%PAGE`_memtype(at, lim)) + -- wf_config: `%`(`%;%`_config(z, [`MEMORY.SIZE`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))),) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, lim),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_fill_oob{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_fill_zero{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_mem(z, x).BYTES_meminst|) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_fill_succ{z : state, at : addrtype, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]), [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_val(v_val) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.FILL`_instr(x)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_oob{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$fun_mem(z, x_1).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$fun_mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_zero{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) <= |$fun_mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) <= |$fun_mem(z, x_2).BYTES_meminst|)) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_le{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (v_n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) <= |$fun_mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) <= |$fun_mem(z, x_2).BYTES_meminst|)) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_copy_gt{z : state, at_1 : addrtype, i_1 : num_, at_2 : addrtype, i_2 : num_, at' : addrtype, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]), [CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0) CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i_1))).0 > $proj_uN_0(!($proj_num__0(i_2))).0) + -- if (v_n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) <= |$fun_mem(z, x_1).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) <= |$fun_mem(z, x_2).BYTES_meminst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at_1), i_1) CONST_instr($numtype_addrtype(at_2), i_2) CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN(v_n,))) `MEMORY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), mk_num__0_num_(at_1, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), mk_num__0_num_(at_2, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x_2, $memarg0),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x_1, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_1), i_1),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at_2), i_2),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at'), mk_num__0_num_(at', `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.COPY`_instr(x_1, x_2),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_init_oob{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_mem(z, x).BYTES_meminst|) \/ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_init_zero{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_data(z, y).BYTES_datainst|)) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule memory_init_succ{z : state, at : addrtype, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]), [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($fun_data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))) STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `MEMORY.INIT`_instr(x, y)]) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$fun_data(z, y).BYTES_datainst|) + -- if ($proj_num__0(j) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_n =/= 0) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$fun_mem(z, x).BYTES_meminst|) /\ (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_data(z, y).BYTES_datainst|)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(x, y)]),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), i),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN($proj_byte_0($fun_data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0]).0,))),) + -- wf_instr: `%`(STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, $memarg0),) + -- wf_instr: `%`(CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_null{z : state, ht : heaptype}: + `%~>%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]), [`REF.NULL_ADDR`_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL`_instr(ht)]),) + -- wf_instr: `%`(`REF.NULL_ADDR`_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_func{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]), [`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0])]) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.FUNCS_moduleinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.FUNC`_instr(x)]),) + -- wf_instr: `%`(`REF.FUNC_ADDR`_instr($f(z).MODULE_frame.FUNCS_moduleinst[$proj_uN_0(x).0]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_test_true{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,)))]) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(1,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_test_false{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,)))]) + -- ~ Step_read_before_ref_test_false: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.TEST`_instr(rt)]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_cast_succeed{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)]), [$instr_ref(v_ref)]) + -- Ref_ok: `%|-%:%`(v_s, v_ref, $inst_reftype(v_f.MODULE_frame, rt)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule ref_cast_fail{v_s : store, v_f : frame, v_ref : ref, rt : reftype}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)]), [TRAP_instr]) + -- ~ Step_read_before_ref_cast_fail: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)])) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [$instr_ref(v_ref) `REF.CAST`_instr(rt)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule struct_new_default{z : state, x : idx, val_lst : val*, mut_opt_lst : mut?*, zt_lst : storagetype*}: + `%~>%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]), $instr_val(v_val)*{v_val <- val_lst} ++ [`STRUCT.NEW`_instr(x)]) + -- Expand: `%~~%`($fun_type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- if (|val_lst| = |zt_lst|) + -- (if ($default_($unpack(zt)) =/= ?()))*{zt <- zt_lst} + -- (if (!($default_($unpack(zt))) = ?(v_val)))*{v_val <- val_lst, zt <- zt_lst} + -- (wf_val: `%`(v_val,))*{v_val <- val_lst} + -- wf_config: `%`(`%;%`_config(z, [`STRUCT.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`STRUCT.NEW`_instr(x),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule struct_get_null{z : state, sx_opt : sx?, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx_opt, x, i)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `STRUCT.GET`_instr(sx_opt, x, i)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule struct_get_struct{z : state, a : addr, sx_opt : sx?, x : idx, i : fieldidx, zt_lst : storagetype*, mut_opt_lst : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx_opt, x, i)]), [$instr_val(!($unpackfield_(zt_lst[$proj_uN_0(i).0], sx_opt, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0])))]) + -- if ($unpackfield_(zt_lst[$proj_uN_0(i).0], sx_opt, $s(z).STRUCTS_store[a].FIELDS_structinst[$proj_uN_0(i).0]) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt_lst|) + -- if ($proj_uN_0(i).0 < |$s(z).STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |$s(z).STRUCTS_store|) + -- Expand: `%~~%`($fun_type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) `STRUCT.GET`_instr(sx_opt, x, i)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new_default{z : state, v_n : n, x : idx, v_val : val, mut_opt : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DEFAULT`_instr(x)]), $instr_val(v_val)^v_n{} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($default_($unpack(zt)) =/= ?()) + -- if (!($default_($unpack(zt))) = ?(v_val)) + -- wf_val: `%`(v_val,) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DEFAULT`_instr(x)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new_elem_oob{z : state, i : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$fun_elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new_elem_alloc{z : state, i : num_, v_n : n, x : idx, y : idx, ref_lst : ref*}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_ELEM`_instr(x, y)]), $instr_ref(v_ref)^v_n{v_ref <- ref_lst} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]) + -- if ($proj_num__0(i) =/= ?()) + -- if (ref_lst = $fun_elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(i))).0 : v_n]) + -- (wf_ref: `%`(v_ref,))*{v_ref <- ref_lst} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new_data_oob{z : state, i : num_, v_n : n, x : idx, y : idx, mut_opt : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($proj_num__0(i) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + ((((v_n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_new_data_num{z : state, i : num_, v_n : n, x : idx, y : idx, zt : storagetype, c_lst : lit_*, mut_opt : mut?}: + `%~>%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DATA`_instr(x, y)]), $const(!($cunpack(zt)), $cunpacknum_(zt, c))^v_n{c <- c_lst} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]) + -- (if ($cunpack(zt) =/= ?()))^v_n{} + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($zsize(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($concatn_(syntax byte, $zbytes_(zt, c)^v_n{c <- c_lst}, (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) = $fun_data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(i))).0 : ((((v_n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- (wf_lit_: `%%`(zt, c))*{c <- c_lst} + -- wf_config: `%`(`%;%`_config(z, [CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.NEW_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_get_null{z : state, i : num_, sx_opt : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_get_oob{z : state, a : addr, i : num_, sx_opt : sx?, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_get_array{z : state, a : addr, i : num_, sx_opt : sx?, x : idx, zt : storagetype, mut_opt : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]), [$instr_val(!($unpackfield_(zt, sx_opt, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0])))]) + -- if ($unpackfield_(zt, sx_opt, $s(z).ARRAYS_store[a].FIELDS_arrayinst[$proj_uN_0(!($proj_num__0(i))).0]) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_num__0(i) =/= ?()) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) `ARRAY.GET`_instr(sx_opt, x)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_len_null{z : state}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_len_array{z : state, a : addr}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]), [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,)))]) + -- if (a < |$s(z).ARRAYS_store|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) `ARRAY.LEN`_instr]),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(|$s(z).ARRAYS_store[a].FIELDS_arrayinst|,))),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_fill_null{z : state, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_fill_oob{z : state, a : addr, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_fill_zero{z : state, a : addr, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]), []) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_fill_succ{z : state, a : addr, i : num_, v_val : val, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.FILL`_instr(x)]) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_n =/= 0) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.FILL`_instr(x)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.FILL`_instr(x),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_null1{z : state, i_1 : num_, v_ref : ref, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(v_ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_1) $instr_ref(v_ref) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_null2{z : state, v_ref : ref, i_1 : num_, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr(I32_numtype, i_1) `REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob1{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) > |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_oob2{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [TRAP_instr]) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) > |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_zero{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), []) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if ($proj_num__0(i_1) =/= ?()) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_le{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx, sx_opt : sx?, mut_opt : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) `ARRAY.GET`_instr(sx_opt, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- if (v_n =/= 0) + -- if (a_2 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) <= |$s(z).ARRAYS_store[a_2].FIELDS_arrayinst|) + -- if (a_1 < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) <= |$s(z).ARRAYS_store[a_1].FIELDS_arrayinst|) + -- Expand: `%~~%`($fun_type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2))) + -- if (($proj_uN_0(!($proj_num__0(i_1))).0 <= $proj_uN_0(!($proj_num__0(i_2))).0) /\ (sx_opt = $fun_sx(zt_2))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx_opt, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_1))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i_2))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_copy_gt{z : state, a_1 : addr, i_1 : num_, a_2 : addr, i_2 : num_, v_n : n, x_1 : idx, x_2 : idx, sx_opt : sx?, mut_opt : mut?, zt_2 : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]), [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.GET`_instr(sx_opt, x_2) `ARRAY.SET`_instr(x_1) `REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.COPY`_instr(x_1, x_2)]) + -- if ($proj_num__0(i_1) =/= ?()) + -- if ($proj_num__0(i_2) =/= ?()) + -- ~ Step_read_before_array_copy_gt: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)])) + -- Expand: `%~~%`($fun_type(z, x_2), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2))) + -- if (sx_opt = $fun_sx(zt_2)) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a_1) CONST_instr(I32_numtype, i_1) `REF.ARRAY_ADDR`_instr(a_2) CONST_instr(I32_numtype, i_2) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.COPY`_instr(x_1, x_2)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_1))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((($proj_uN_0(!($proj_num__0(i_2))).0 + v_n) : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.GET`_instr(sx_opt, x_2),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_1),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i_2),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.COPY`_instr(x_1, x_2),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt_2)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_null{z : state, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_oob1{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_oob2{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + v_n) > |$fun_elem(z, y).REFS_eleminst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_zero{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), []) + -- if ($proj_num__0(j) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_elem(z, y).REFS_eleminst|) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_elem_succ{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx, v_ref : ref}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_ref(v_ref) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_ELEM`_instr(x, y)]) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if (v_n =/= 0) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + v_n) <= |$fun_elem(z, y).REFS_eleminst|) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) <= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- if ($proj_uN_0(!($proj_num__0(j))).0 < |$fun_elem(z, y).REFS_eleminst|) + -- if (v_ref = $fun_elem(z, y).REFS_eleminst[$proj_uN_0(!($proj_num__0(j))).0]) + -- wf_ref: `%`(v_ref,) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_ELEM`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_ELEM`_instr(x, y),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_null{z : state, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob1{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if (($proj_uN_0(!($proj_num__0(i))).0 + v_n) > |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_oob2{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx, mut_opt : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [TRAP_instr]) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- if (($proj_uN_0(!($proj_num__0(j))).0 + ((((v_n * !($zsize(zt))) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_data(z, y).BYTES_datainst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(TRAP_instr,) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_zero{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]), []) + -- ~ Step_read_before_array_init_data_zero: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- if (v_n = 0) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule array_init_data_num{z : state, a : addr, i : num_, j : num_, v_n : n, x : idx, y : idx, zt : storagetype, c : lit_, mut_opt : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]), [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $const(!($cunpack(zt)), $cunpacknum_(zt, c)) `ARRAY.SET`_instr(x) `REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))) `ARRAY.INIT_DATA`_instr(x, y)]) + -- if ($cunpack(zt) =/= ?()) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(j) =/= ?()) + -- if ($zsize(zt) =/= ?()) + -- ~ Step_read_before_array_init_data_num: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)])) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if ($zbytes_(zt, c) = $fun_data(z, y).BYTES_datainst[$proj_uN_0(!($proj_num__0(j))).0 : (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)]) + -- wf_lit_: `%%`(zt, c) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) CONST_instr(I32_numtype, j) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `ARRAY.INIT_DATA`_instr(x, y)]),) + -- wf_instr: `%`(`REF.ARRAY_ADDR`_instr(a),) + -- wf_instr: `%`(CONST_instr(I32_numtype, i),) + -- wf_instr: `%`(`ARRAY.SET`_instr(x),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(i))).0 + 1),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(($proj_uN_0(!($proj_num__0(j))).0 + (((!($zsize(zt)) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)),))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN((((v_n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),))),) + -- wf_instr: `%`(`ARRAY.INIT_DATA`_instr(x, y),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:5.1-5.88 +relation Step: `%~>%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:13.1-15.34 + rule pure{z : state, instr_lst : instr*, instr'_lst : instr*}: + `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z, instr'_lst)) + -- Step_pure: `%~>%`(instr_lst, instr'_lst) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z, instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:17.1-19.37 + rule read{z : state, instr_lst : instr*, instr'_lst : instr*}: + `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z, instr'_lst)) + -- Step_read: `%~>%`(`%;%`_config(z, instr_lst), instr'_lst) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z, instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:32.1-35.43 + rule ctxt_instrs{z : state, val_lst : val*, instr_lst : instr*, instr_1_lst : instr*, z' : state, instr'_lst : instr*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)*{v_val <- val_lst} ++ instr_lst ++ instr_1_lst), `%;%`_config(z', $instr_val(v_val)*{v_val <- val_lst} ++ instr'_lst ++ instr_1_lst)) + -- Step: `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z', instr'_lst)) + -- if ((val_lst =/= []) \/ (instr_1_lst =/= [])) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)*{v_val <- val_lst} ++ instr_lst ++ instr_1_lst),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(v_val)*{v_val <- val_lst} ++ instr'_lst ++ instr_1_lst),) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z', instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:37.1-39.36 + rule ctxt_label{z : state, v_n : n, instr_0_lst : instr*, instr_lst : instr*, z' : state, instr'_lst : instr*}: + `%~>%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(v_n, instr_0_lst, instr_lst)]), `%;%`_config(z', [`LABEL_%{%}%`_instr(v_n, instr_0_lst, instr'_lst)])) + -- Step: `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z', instr'_lst)) + -- wf_config: `%`(`%;%`_config(z, [`LABEL_%{%}%`_instr(v_n, instr_0_lst, instr_lst)]),) + -- wf_config: `%`(`%;%`_config(z', [`LABEL_%{%}%`_instr(v_n, instr_0_lst, instr'_lst)]),) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z', instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:41.1-43.36 + rule ctxt_handler{z : state, v_n : n, catch_lst : catch*, instr_lst : instr*, z' : state, instr'_lst : instr*}: + `%~>%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, catch_lst, instr_lst)]), `%;%`_config(z', [`HANDLER_%{%}%`_instr(v_n, catch_lst, instr'_lst)])) + -- Step: `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z', instr'_lst)) + -- wf_config: `%`(`%;%`_config(z, [`HANDLER_%{%}%`_instr(v_n, catch_lst, instr_lst)]),) + -- wf_config: `%`(`%;%`_config(z', [`HANDLER_%{%}%`_instr(v_n, catch_lst, instr'_lst)]),) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z', instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:45.1-47.45 + rule ctxt_frame{v_s : store, v_f : frame, v_n : n, f' : frame, instr_lst : instr*, s' : store, f'' : frame, instr'_lst : instr*}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), [`FRAME_%{%}%`_instr(v_n, f', instr_lst)]), `%;%`_config(`%;%`_state(s', v_f), [`FRAME_%{%}%`_instr(v_n, f'', instr'_lst)])) + -- Step: `%~>%`(`%;%`_config(`%;%`_state(v_s, f'), instr_lst), `%;%`_config(`%;%`_state(s', f''), instr'_lst)) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), [`FRAME_%{%}%`_instr(v_n, f', instr_lst)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', v_f), [`FRAME_%{%}%`_instr(v_n, f'', instr'_lst)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, f'), instr_lst),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', f''), instr'_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:173.1-174.48 + rule call_ref_null{z : state, yy : typeuse}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:176.1-182.61 + rule call_ref_func{z : state, v_n : n, val_lst : val*, a : addr, yy : typeuse, v_m : m, v_f : frame, instr_lst : instr*, fi : funcinst, t_1_lst : valtype*, t_2_lst : valtype*, x : idx, t_lst : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(z, [`FRAME_%{%}%`_instr(v_m, v_f, [`LABEL_%{%}%`_instr(v_m, [], instr_lst)])])) + -- if (a < |$s(z).FUNCS_store|) + -- if ($s(z).FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (fi.CODE_funcinst = FUNC_funccode(x, LOCAL_local(t)*{t <- t_lst}, instr_lst)) + -- (if ($default_(t) =/= ?()))*{t <- t_lst} + -- if (v_f = {LOCALS ?(v_val)^v_n{v_val <- val_lst} ++ !($default_(t))*{t <- t_lst}, MODULE fi.MODULE_funcinst}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(z, [`FRAME_%{%}%`_instr(v_m, v_f, [`LABEL_%{%}%`_instr(v_m, [], instr_lst)])]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_funccode: `%`(FUNC_funccode(x, LOCAL_local(t)*{t <- t_lst}, instr_lst),) + -- wf_frame: `%`({LOCALS ?(v_val)^v_n{v_val <- val_lst} ++ !($default_(t))*{t <- t_lst}, MODULE fi.MODULE_funcinst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:184.1-190.59 + rule call_ref_hostfunc_res{v_s : store, v_f : frame, v_n : n, val_lst : val*, a : addr, yy : typeuse, s' : store, v_result : result, fi : funcinst, t_1_lst : valtype*, v_m : m, t_2_lst : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(s', v_f), $lift_result(v_result))) + -- if (a < |v_s.FUNCS_store|) + -- if (v_s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), v_s, val_lst)| > 0) + -- if (RES_hostcallresult(s', v_result) <- $hostcall(_HOSTFUNC_hostfunc(hf), v_s, val_lst)) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s', v_f), $lift_result(v_result)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(RES_hostcallresult(s', v_result),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:192.1-198.49 + rule call_ref_hostfunc_div{v_s : store, v_f : frame, v_n : n, val_lst : val*, a : addr, yy : typeuse, fi : funcinst, t_1_lst : valtype*, v_m : m, t_2_lst : valtype*, hf : text}: + `%~>%`(`%;%`_config(`%;%`_state(v_s, v_f), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]), `%;%`_config(`%;%`_state(v_s, v_f), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)])) + -- if (a < |v_s.FUNCS_store|) + -- if (v_s.FUNCS_store[a] = fi) + -- Expand: `%~~%`(fi.TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (fi.CODE_funcinst = _HOSTFUNC_funccode(hf)) + -- if (|$hostcall(_HOSTFUNC_hostfunc(hf), v_s, val_lst)| > 0) + -- if (BOT_hostcallresult <- $hostcall(_HOSTFUNC_hostfunc(hf), v_s, val_lst)) + -- wf_funcinst: `%`(fi,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(a) CALL_REF_instr(yy)]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_funccode: `%`(_HOSTFUNC_funccode(hf),) + -- wf_hostcallresult: `%`(BOT_hostcallresult,) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:242.1-246.55 + rule throw{z : state, v_n : n, val_lst : val*, x : idx, exn : exninst, a : addr, t_lst : valtype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [THROW_instr(x)]), `%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr])) + -- if ($as_deftype($fun_tag(z, x).TYPE_taginst) =/= ?()) + -- Expand: `%~~%`(!($as_deftype($fun_tag(z, x).TYPE_taginst)), `FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],))) + -- if (a = |$s(z).EXNS_store|) + -- if ($proj_uN_0(x).0 < |$f(z).MODULE_frame.TAGS_moduleinst|) + -- if (exn = {TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val_lst}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [THROW_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_exninst(z, exn), [`REF.EXN_ADDR`_instr(a) THROW_REF_instr]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],)),) + -- wf_exninst: `%`({TAG $f(z).MODULE_frame.TAGS_moduleinst[$proj_uN_0(x).0], FIELDS val_lst},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:320.1-321.56 + rule local_set{z : state, v_val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(v_val) `LOCAL.SET`_instr(x)]), `%;%`_config($with_local(z, x, v_val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(v_val) `LOCAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_local(z, x, v_val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:333.1-334.58 + rule global_set{z : state, v_val : val, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_val(v_val) `GLOBAL.SET`_instr(x)]), `%;%`_config($with_global(z, x, v_val), [])) + -- wf_config: `%`(`%;%`_config(z, [$instr_val(v_val) `GLOBAL.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_global(z, x, v_val), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:347.1-349.33 + rule table_set_oob{z : state, at : addrtype, i : num_, v_ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(v_ref) `TABLE.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(v_ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:351.1-353.32 + rule table_set_val{z : state, at : addrtype, i : num_, v_ref : ref, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(v_ref) `TABLE.SET`_instr(x)]), `%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, v_ref), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_uN_0(!($proj_num__0(i))).0 < |$fun_table(z, x).REFS_tableinst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) $instr_ref(v_ref) `TABLE.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_table(z, x, $proj_uN_0(!($proj_num__0(i))).0, v_ref), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:362.1-365.46 + rule table_grow_succeed{z : state, v_ref : ref, at : addrtype, v_n : n, x : idx, ti : tableinst}: + `%~>%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.GROW`_instr(x)]), `%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$fun_table(z, x).REFS_tableinst|,)))])) + -- if ($growtable($fun_table(z, x), v_n, v_ref) =/= ?()) + -- if (ti = !($growtable($fun_table(z, x), v_n, v_ref))) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_tableinst(z, x, ti), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(|$fun_table(z, x).REFS_tableinst|,)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:367.1-368.87 + rule table_grow_fail{z : state, v_ref : ref, at : addrtype, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [$instr_ref(v_ref) CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `TABLE.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:428.1-429.51 + rule elem_drop{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]), `%;%`_config($with_elem(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`ELEM.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_elem(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:512.1-515.60 + rule store_num_oob{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:517.1-521.29 + rule store_num_val{z : state, at : addrtype, i : num_, nt : numtype, c : num_, x : idx, ao : memarg, b_lst : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b_lst = $nbytes_(nt, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr(nt, c) STORE_instr(nt, ?(), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($size(nt) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:523.1-526.52 + rule store_pack_oob{z : state, at : addrtype, i : num_, v_Inn : Inn, c : num_, v_n : n, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(v_Inn), c) STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_n,),))), x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(v_Inn), c) STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:528.1-532.52 + rule store_pack_val{z : state, at : addrtype, i : num_, v_Inn : Inn, c : num_, v_n : n, x : idx, ao : memarg, b_lst : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(v_Inn), c) STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_n,),))), x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((v_n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($proj_num__0(c) =/= ?()) + -- if (b_lst = $ibytes_(v_n, $wrap__($size($numtype_addrtype(v_Inn)), v_n, !($proj_num__0(c))))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) CONST_instr($numtype_addrtype(v_Inn), c) STORE_instr($numtype_addrtype(v_Inn), ?(mk_storeop__0_storeop_(v_Inn, `%`_storeop_Inn(`%`_sz(v_n,),))), x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((v_n : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:534.1-537.63 + rule vstore_oob{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:539.1-542.31 + rule vstore_val{z : state, at : addrtype, i : num_, c : vec_, x : idx, ao : memarg, b_lst : byte*}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (b_lst = $vbytes_(V128_vectype, c)) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_instr(V128_vectype, x, ao)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), ((($vsize(V128_vectype) : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:545.1-548.52 + rule vstore_lane_oob{z : state, at : addrtype, i : num_, c : vec_, v_N : N, x : idx, ao : memarg, j : laneidx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if ((($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0) + (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat)) > |$fun_mem(z, x).BYTES_meminst|) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:550.1-555.49 + rule vstore_lane_val{z : state, at : addrtype, i : num_, c : vec_, v_N : N, x : idx, ao : memarg, j : laneidx, b_lst : byte*, v_Jnn : Jnn, v_M : M}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]), `%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if (v_N = $jsize(v_Jnn)) + -- if (($proj_dim_0(v_M).0 : nat <:> rat) = ((128 : nat <:> rat) / (v_N : nat <:> rat))) + -- if ($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c)[$proj_uN_0(j).0]) =/= ?()) + -- if ($proj_uN_0(j).0 < |$lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c)|) + -- if (b_lst = $ibytes_(v_N, `%`_iN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c)[$proj_uN_0(j).0]))).0,))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), i) VCONST_instr(V128_vectype, c) VSTORE_LANE_instr(V128_vectype, `%`_sz(v_N,), x, ao, j)]),) + -- wf_config: `%`(`%;%`_config($with_mem(z, x, ($proj_uN_0(!($proj_num__0(i))).0 + $proj_uN_0(ao.OFFSET_memarg).0), (((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat), b_lst), []),) + -- wf_uN: `%%`(v_N, `%`_uN($proj_uN_0(!($proj_lane__2($lanes_(`%X%`_shape($lanetype_Jnn(v_Jnn), v_M), c)[$proj_uN_0(j).0]))).0,)) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:564.1-567.37 + rule memory_grow_succeed{z : state, at : addrtype, v_n : n, x : idx, mi : meminst}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$fun_mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))])) + -- if ($growmem($fun_mem(z, x), v_n) =/= ?()) + -- if (mi = !($growmem($fun_mem(z, x), v_n))) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_meminst(z, x, mi), [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN((((|$fun_mem(z, x).BYTES_meminst| : nat <:> rat) / ((64 * $Ki) : nat <:> rat)) : rat <:> nat),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:569.1-570.84 + rule memory_grow_fail{z : state, at : addrtype, v_n : n, x : idx}: + `%~>%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.GROW`_instr(x)]), `%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))])) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN(v_n,))) `MEMORY.GROW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [CONST_instr($numtype_addrtype(at), mk_num__0_num_(at, `%`_uN($inv_signed_($size($numtype_addrtype(at)), - (1 : nat <:> int)),)))]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:630.1-631.51 + rule data_drop{z : state, x : idx}: + `%~>%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]), `%;%`_config($with_data(z, x, []), [])) + -- wf_config: `%`(`%;%`_config(z, [`DATA.DROP`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_data(z, x, []), []),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:702.1-706.65 + rule struct_new{z : state, v_n : n, val_lst : val*, x : idx, si : structinst, a : addr, mut_opt_lst : mut?*, zt_lst : storagetype*}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`STRUCT.NEW`_instr(x)]), `%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)])) + -- Expand: `%~~%`($fun_type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)^v_n{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- if (a = |$s(z).STRUCTS_store|) + -- (if ($packfield_(zt, v_val) =/= ?()))^v_n{v_val <- val_lst, zt <- zt_lst} + -- if (si = {TYPE $fun_type(z, x), FIELDS !($packfield_(zt, v_val))^v_n{v_val <- val_lst, zt <- zt_lst}}) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`STRUCT.NEW`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($add_structinst(z, si), [`REF.STRUCT_ADDR`_instr(a)]),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)^v_n{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + -- wf_structinst: `%`({TYPE $fun_type(z, x), FIELDS !($packfield_(zt, v_val))^v_n{v_val <- val_lst, zt <- zt_lst}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:723.1-724.55 + rule struct_set_null{z : state, v_val : val, x : idx, i : fieldidx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(v_val) `STRUCT.SET`_instr(x, i)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr $instr_val(v_val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:726.1-729.46 + rule struct_set_struct{z : state, a : addr, v_val : val, x : idx, i : fieldidx, zt_lst : storagetype*, mut_opt_lst : mut?*}: + `%~>%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(v_val) `STRUCT.SET`_instr(x, i)]), `%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt_lst[$proj_uN_0(i).0], v_val))), [])) + -- if ($packfield_(zt_lst[$proj_uN_0(i).0], v_val) =/= ?()) + -- if ($proj_uN_0(i).0 < |zt_lst|) + -- Expand: `%~~%`($fun_type(z, x), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- wf_config: `%`(`%;%`_config(z, [`REF.STRUCT_ADDR`_instr(a) $instr_val(v_val) `STRUCT.SET`_instr(x, i)]),) + -- wf_config: `%`(`%;%`_config($with_struct(z, a, $proj_uN_0(i).0, !($packfield_(zt_lst[$proj_uN_0(i).0], v_val))), []),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:742.1-747.65 + rule array_new_fixed{z : state, v_n : n, val_lst : val*, x : idx, ai : arrayinst, a : addr, mut_opt : mut?, zt : storagetype}: + `%~>%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]), `%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)])) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- (if ($packfield_(zt, v_val) =/= ?()))^v_n{v_val <- val_lst} + -- if ((a = |$s(z).ARRAYS_store|) /\ (ai = {TYPE $fun_type(z, x), FIELDS !($packfield_(zt, v_val))^v_n{v_val <- val_lst}})) + -- wf_config: `%`(`%;%`_config(z, $instr_val(v_val)^v_n{v_val <- val_lst} ++ [`ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,))]),) + -- wf_config: `%`(`%;%`_config($add_arrayinst(z, ai), [`REF.ARRAY_ADDR`_instr(a)]),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + -- wf_arrayinst: `%`({TYPE $fun_type(z, x), FIELDS !($packfield_(zt, v_val))^v_n{v_val <- val_lst}},) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:787.1-788.66 + rule array_set_null{z : state, i : num_, v_val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- wf_config: `%`(`%;%`_config(z, [`REF.NULL_ADDR`_instr CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:790.1-792.38 + rule array_set_oob{z : state, a : addr, i : num_, v_val : val, x : idx}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]), `%;%`_config(z, [TRAP_instr])) + -- if ($proj_num__0(i) =/= ?()) + -- if (a < |$s(z).ARRAYS_store|) + -- if ($proj_uN_0(!($proj_num__0(i))).0 >= |$s(z).ARRAYS_store[a].FIELDS_arrayinst|) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config(z, [TRAP_instr]),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:794.1-797.44 + rule array_set_array{z : state, a : addr, i : num_, v_val : val, x : idx, zt : storagetype, mut_opt : mut?}: + `%~>%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]), `%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, v_val))), [])) + -- if ($proj_num__0(i) =/= ?()) + -- if ($packfield_(zt, v_val) =/= ?()) + -- Expand: `%~~%`($fun_type(z, x), ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- wf_config: `%`(`%;%`_config(z, [`REF.ARRAY_ADDR`_instr(a) CONST_instr(I32_numtype, i) $instr_val(v_val) `ARRAY.SET`_instr(x)]),) + -- wf_config: `%`(`%;%`_config($with_array(z, a, $proj_uN_0(!($proj_num__0(i))).0, !($packfield_(zt, v_val))), []),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:8.1-8.92 +relation Steps: `%~>*%`(config, config) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:21.1-22.26 + rule refl{z : state, instr_lst : instr*}: + `%~>*%`(`%;%`_config(z, instr_lst), `%;%`_config(z, instr_lst)) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec:24.1-27.44 + rule trans{z : state, instr_lst : instr*, z'' : state, instr''_lst : instr*, z' : state, instr'_lst : instr*}: + `%~>*%`(`%;%`_config(z, instr_lst), `%;%`_config(z'', instr''_lst)) + -- Step: `%~>%`(`%;%`_config(z, instr_lst), `%;%`_config(z', instr'_lst)) + -- Steps: `%~>*%`(`%;%`_config(z', instr'_lst), `%;%`_config(z'', instr''_lst)) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z'', instr''_lst),) + -- wf_config: `%`(`%;%`_config(z', instr'_lst),) +} + +;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec +relation Eval_expr: `%;%~>*%;%`(state, expr, state, val*) + ;; ../../../../specification/wasm-3.0/4.3-execution.instructions.spectec + rule mk_Eval_expr{z : state, instr_lst : instr*, z' : state, val_lst : val*}: + `%;%~>*%;%`(z, instr_lst, z', val_lst) + -- Steps: `%~>*%`(`%;%`_config(z, instr_lst), `%;%`_config(z', $instr_val(v_val)*{v_val <- val_lst})) + -- wf_config: `%`(`%;%`_config(z, instr_lst),) + -- wf_config: `%`(`%;%`_config(z', $instr_val(v_val)*{v_val <- val_lst}),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:7.1-7.63 +def $alloctypes(var_0 : type*) : deftype* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:8.1-8.27 + def $alloctypes([]) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:9.1-13.24 + def $alloctypes{type'_lst : type*, v_type : type, deftype_lst : deftype*, x : uN}(type'_lst ++ [v_type]) = deftype'_lst ++ deftype_lst + -- let{deftype'_lst : deftype*} deftype'_lst = $alloctypes(type'_lst) + -- let{v_rectype : rectype} TYPE_type(v_rectype) = v_type + -- if (deftype_lst = $subst_all_deftypes($rolldt(x, v_rectype), $typeuse_deftype(deftype'#2)*{deftype'#2 <- deftype'_lst})) + -- if ($proj_uN_0(x).0 = |deftype'_lst|) + -- wf_uN: `%%`(32, x) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctag(v_store : store, v_tagtype : tagtype) : (store, tagaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctag{v_s : store, v_tagtype : typeuse, v_taginst : taginst}(v_s, v_tagtype) = (v_s +++ {TAGS [v_taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.TAGS_store|) + -- if (v_taginst = {TYPE v_tagtype}) + -- wf_store: `%`({TAGS [v_taginst], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_taginst: `%`({TYPE v_tagtype},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:20.1-20.102 +def $alloctags(v_store : store, var_0 : tagtype*) : (store, tagaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:21.1-21.34 + def $alloctags{v_s : store}(v_s, []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:22.1-24.49 + def $alloctags{v_s : store, v_tagtype : typeuse, tagtype'_lst : tagtype*}(v_s, [v_tagtype] ++ tagtype'_lst) = (s_2, [ja] ++ ja'_lst) + -- let{ja : tagaddr, s_1 : store} (s_1, ja) = $alloctag(v_s, v_tagtype) + -- let{s_2 : store, ja'_lst : tagaddr*} (s_2, ja'_lst) = $alloctags(s_1, tagtype'_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocglobal(v_store : store, v_globaltype : globaltype, v_val : val) : (store, globaladdr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocglobal{v_s : store, v_globaltype : globaltype, v_val : val, v_globalinst : globalinst}(v_s, v_globaltype, v_val) = (v_s +++ {TAGS [], GLOBALS [v_globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.GLOBALS_store|) + -- if (v_globalinst = {TYPE v_globaltype, VALUE v_val}) + -- wf_store: `%`({TAGS [], GLOBALS [v_globalinst], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_globalinst: `%`({TYPE v_globaltype, VALUE v_val},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:31.1-31.122 +def $allocglobals(v_store : store, var_0 : globaltype*, var_1 : val*) : (store, globaladdr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:32.1-32.42 + def $allocglobals{v_s : store}(v_s, [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:33.1-35.62 + def $allocglobals{v_s : store, v_globaltype : globaltype, globaltype'_lst : globaltype*, v_val : val, val'_lst : val*}(v_s, [v_globaltype] ++ globaltype'_lst, [v_val] ++ val'_lst) = (s_2, [ga] ++ ga'_lst) + -- let{ga : globaladdr, s_1 : store} (s_1, ga) = $allocglobal(v_s, v_globaltype, v_val) + -- let{s_2 : store, ga'_lst : globaladdr*} (s_2, ga'_lst) = $allocglobals(s_1, globaltype'_lst, val'_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmem(v_store : store, v_memtype : memtype) : (store, memaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmem{v_s : store, at : addrtype, i : uN, j_opt : u64?, v_meminst : meminst}(v_s, `%%PAGE`_memtype(at, `[%..%]`_limits(i, j_opt))) = (v_s +++ {TAGS [], GLOBALS [], MEMS [v_meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.MEMS_store|) + -- if (v_meminst = {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j_opt)), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [v_meminst], TABLES [], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(i, j_opt)), BYTES `%`_byte(0,)^($proj_uN_0(i).0 * (64 * $Ki)){}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:42.1-42.102 +def $allocmems(v_store : store, var_0 : memtype*) : (store, memaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:43.1-43.34 + def $allocmems{v_s : store}(v_s, []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:44.1-46.49 + def $allocmems{v_s : store, v_memtype : memtype, memtype'_lst : memtype*}(v_s, [v_memtype] ++ memtype'_lst) = (s_2, [ma] ++ ma'_lst) + -- let{ma : memaddr, s_1 : store} (s_1, ma) = $allocmem(v_s, v_memtype) + -- let{s_2 : store, ma'_lst : memaddr*} (s_2, ma'_lst) = $allocmems(s_1, memtype'_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $alloctable(v_store : store, v_tabletype : tabletype, v_ref : ref) : (store, tableaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $alloctable{v_s : store, at : addrtype, i : uN, j_opt : u64?, rt : reftype, v_ref : ref, v_tableinst : tableinst}(v_s, `%%%`_tabletype(at, `[%..%]`_limits(i, j_opt), rt), v_ref) = (v_s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [v_tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.TABLES_store|) + -- if (v_tableinst = {TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j_opt), rt), REFS v_ref^$proj_uN_0(i).0{}}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [v_tableinst], FUNCS [], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(i, j_opt), rt), REFS v_ref^$proj_uN_0(i).0{}},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:53.1-53.118 +def $alloctables(v_store : store, var_0 : tabletype*, var_1 : ref*) : (store, tableaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:54.1-54.41 + def $alloctables{v_s : store}(v_s, [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:55.1-57.60 + def $alloctables{v_s : store, v_tabletype : tabletype, tabletype'_lst : tabletype*, v_ref : ref, ref'_lst : ref*}(v_s, [v_tabletype] ++ tabletype'_lst, [v_ref] ++ ref'_lst) = (s_2, [ta] ++ ta'_lst) + -- let{ta : tableaddr, s_1 : store} (s_1, ta) = $alloctable(v_s, v_tabletype, v_ref) + -- let{s_2 : store, ta'_lst : tableaddr*} (s_2, ta'_lst) = $alloctables(s_1, tabletype'_lst, ref'_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocfunc(v_store : store, v_deftype : deftype, v_funccode : funccode, v_moduleinst : moduleinst) : (store, funcaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocfunc{v_s : store, v_deftype : deftype, v_funccode : funccode, v_moduleinst : moduleinst, v_funcinst : funcinst}(v_s, v_deftype, v_funccode, v_moduleinst) = (v_s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [v_funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.FUNCS_store|) + -- if (v_funcinst = {TYPE v_deftype, MODULE v_moduleinst, CODE v_funccode}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [v_funcinst], DATAS [], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_funcinst: `%`({TYPE v_deftype, MODULE v_moduleinst, CODE v_funccode},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:64.1-64.133 +def $allocfuncs(v_store : store, var_0 : deftype*, var_1 : funccode*, var_2 : moduleinst*) : (store, funcaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:65.1-65.45 + def $allocfuncs{v_s : store}(v_s, [], [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:66.1-68.71 + def $allocfuncs{v_s : store, dt : deftype, dt'_lst : deftype*, v_funccode : funccode, funccode'_lst : funccode*, v_moduleinst : moduleinst, moduleinst'_lst : moduleinst*}(v_s, [dt] ++ dt'_lst, [v_funccode] ++ funccode'_lst, [v_moduleinst] ++ moduleinst'_lst) = (s_2, [fa] ++ fa'_lst) + -- let{fa : funcaddr, s_1 : store} (s_1, fa) = $allocfunc(v_s, dt, v_funccode, v_moduleinst) + -- let{s_2 : store, fa'_lst : funcaddr*} (s_2, fa'_lst) = $allocfuncs(s_1, dt'_lst, funccode'_lst, moduleinst'_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocdata(v_store : store, v_datatype : datatype, var_0 : byte*) : (store, dataaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocdata{v_s : store, byte_lst : byte*, v_datainst : datainst}(v_s, OK_datatype, byte_lst) = (v_s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [v_datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []}, |v_s.DATAS_store|) + -- if (v_datainst = {BYTES byte_lst}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [v_datainst], ELEMS [], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_datainst: `%`({BYTES byte_lst},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:75.1-75.118 +def $allocdatas(v_store : store, var_0 : datatype*, var_1 : byte**) : (store, dataaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:76.1-76.40 + def $allocdatas{v_s : store}(v_s, [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:77.1-79.53 + def $allocdatas{v_s : store, ok : datatype, ok'_lst : datatype*, b_lst : byte*, b'_lst_lst : byte**}(v_s, [ok] ++ ok'_lst, [b_lst] ++ b'_lst_lst) = (s_2, [da] ++ da'_lst) + -- let{da : dataaddr, s_1 : store} (s_1, da) = $allocdata(v_s, ok, b_lst) + -- let{s_2 : store, da'_lst : dataaddr*} (s_2, da'_lst) = $allocdatas(s_1, ok'_lst, b'_lst_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocelem(v_store : store, v_elemtype : elemtype, var_0 : ref*) : (store, elemaddr) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocelem{v_s : store, v_elemtype : reftype, ref_lst : ref*, v_eleminst : eleminst}(v_s, v_elemtype, ref_lst) = (v_s +++ {TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [v_eleminst], STRUCTS [], ARRAYS [], EXNS []}, |v_s.ELEMS_store|) + -- if (v_eleminst = {TYPE v_elemtype, REFS ref_lst}) + -- wf_store: `%`({TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [v_eleminst], STRUCTS [], ARRAYS [], EXNS []},) + -- wf_eleminst: `%`({TYPE v_elemtype, REFS ref_lst},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:86.1-86.117 +def $allocelems(v_store : store, var_0 : elemtype*, var_1 : ref**) : (store, elemaddr*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:87.1-87.40 + def $allocelems{v_s : store}(v_s, [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:88.1-90.55 + def $allocelems{v_s : store, rt : reftype, rt'_lst : reftype*, ref_lst : ref*, ref'_lst_lst : ref**}(v_s, [rt] ++ rt'_lst, [ref_lst] ++ ref'_lst_lst) = (s_2, [ea] ++ ea'_lst) + -- let{ea : elemaddr, s_1 : store} (s_1, ea) = $allocelem(v_s, rt, ref_lst) + -- let{s_2 : store, ea'_lst : elemaddr*} (s_2, ea'_lst) = $allocelems(s_1, rt'_lst, ref'_lst_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexport(v_moduleinst : moduleinst, v_export : export) : exportinst + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{v_moduleinst : moduleinst, v_name : name, x : uN}(v_moduleinst, EXPORT_export(v_name, TAG_externidx(x))) = {NAME v_name, ADDR TAG_externaddr(v_moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME v_name, ADDR TAG_externaddr(v_moduleinst.TAGS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{v_moduleinst : moduleinst, v_name : name, x : uN}(v_moduleinst, EXPORT_export(v_name, GLOBAL_externidx(x))) = {NAME v_name, ADDR GLOBAL_externaddr(v_moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME v_name, ADDR GLOBAL_externaddr(v_moduleinst.GLOBALS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{v_moduleinst : moduleinst, v_name : name, x : uN}(v_moduleinst, EXPORT_export(v_name, MEM_externidx(x))) = {NAME v_name, ADDR MEM_externaddr(v_moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME v_name, ADDR MEM_externaddr(v_moduleinst.MEMS_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{v_moduleinst : moduleinst, v_name : name, x : uN}(v_moduleinst, EXPORT_export(v_name, TABLE_externidx(x))) = {NAME v_name, ADDR TABLE_externaddr(v_moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME v_name, ADDR TABLE_externaddr(v_moduleinst.TABLES_moduleinst[$proj_uN_0(x).0])},) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexport{v_moduleinst : moduleinst, v_name : name, x : uN}(v_moduleinst, EXPORT_export(v_name, FUNC_externidx(x))) = {NAME v_name, ADDR FUNC_externaddr(v_moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])} + -- wf_exportinst: `%`({NAME v_name, ADDR FUNC_externaddr(v_moduleinst.FUNCS_moduleinst[$proj_uN_0(x).0])},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocexports(v_moduleinst : moduleinst, var_0 : export*) : exportinst* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocexports{v_moduleinst : moduleinst, export_lst : export*}(v_moduleinst, export_lst) = $allocexport(v_moduleinst, v_export)*{v_export <- export_lst} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $allocmodule(v_store : store, v_module : module, var_0 : externaddr*, var_1 : val*, var_2 : ref*, var_3 : ref**) : (store, moduleinst) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $allocmodule{v_s : store, v_module : module, externaddr_lst : externaddr*, val_G_lst : val*, ref_T_lst : ref*, ref_E_lst_lst : ref**, s_7 : store, v_moduleinst : moduleinst, tagtype_lst : tagtype*, expr_G_lst : expr*, globaltype_lst : globaltype*, memtype_lst : memtype*, expr_T_lst : expr*, tabletype_lst : tabletype*, expr_F_lst : expr*, local_lst_lst : local**, x_lst : idx*, byte_lst_lst : byte**, datamode_lst : datamode*, elemmode_lst : elemmode*, elemtype_lst : elemtype*, expr_E_lst_lst : expr**, xi_lst : exportinst*}(v_s, v_module, externaddr_lst, val_G_lst, ref_T_lst, ref_E_lst_lst) = (s_7, v_moduleinst) + -- let{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*} MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)) = v_module + -- if (tag_lst = TAG_tag(tagtype#1)*{tagtype#1 <- tagtype_lst}) + -- if (global_lst = GLOBAL_global(globaltype#122, expr_G#1)*{expr_G#1 <- expr_G_lst, globaltype#122 <- globaltype_lst}) + -- if (mem_lst = MEMORY_mem(memtype#1)*{memtype#1 <- memtype_lst}) + -- if (table_lst = TABLE_table(tabletype#156, expr_T#1)*{expr_T#1 <- expr_T_lst, tabletype#156 <- tabletype_lst}) + -- if (func_lst = FUNC_func(x#4, local_lst#82, expr_F#1)*{expr_F#1 <- expr_F_lst, local_lst#82 <- local_lst_lst, x#4 <- x_lst}) + -- if (data_lst = DATA_data(byte_lst#110, datamode#110)*{byte_lst#110 <- byte_lst_lst, datamode#110 <- datamode_lst}) + -- if (elem_lst = ELEM_elem(elemtype#1, expr_E_lst#1, elemmode#230)*{elemmode#230 <- elemmode_lst, elemtype#1 <- elemtype_lst, expr_E_lst#1 <- expr_E_lst_lst}) + -- let{aa_I_lst : tagaddr*} aa_I_lst = $tagsxa(externaddr_lst) + -- let{ga_I_lst : globaladdr*} ga_I_lst = $globalsxa(externaddr_lst) + -- let{ma_I_lst : memaddr*} ma_I_lst = $memsxa(externaddr_lst) + -- let{ta_I_lst : tableaddr*} ta_I_lst = $tablesxa(externaddr_lst) + -- let{fa_I_lst : funcaddr*} fa_I_lst = $funcsxa(externaddr_lst) + -- let{dt_lst : deftype*} dt_lst = $alloctypes(type_lst) + -- let{fa_lst : nat*} fa_lst = (|v_s.FUNCS_store| + i_F#1)^(i_F#1<|func_lst|){} + -- let{s_1 : store, aa_lst : tagaddr*} (s_1, aa_lst) = $alloctags(v_s, $subst_all_tagtype(tagtype#2, $typeuse_deftype(dt#9)*{dt#9 <- dt_lst})*{tagtype#2 <- tagtype_lst}) + -- let{s_2 : store, ga_lst : globaladdr*} (s_2, ga_lst) = $allocglobals(s_1, $subst_all_globaltype(globaltype#124, $typeuse_deftype(dt#10)*{dt#10 <- dt_lst})*{globaltype#124 <- globaltype_lst}, val_G_lst) + -- let{s_3 : store, ma_lst : memaddr*} (s_3, ma_lst) = $allocmems(s_2, $subst_all_memtype(memtype#2, $typeuse_deftype(dt#11)*{dt#11 <- dt_lst})*{memtype#2 <- memtype_lst}) + -- let{s_4 : store, ta_lst : tableaddr*} (s_4, ta_lst) = $alloctables(s_3, $subst_all_tabletype(tabletype#158, $typeuse_deftype(dt#12)*{dt#12 <- dt_lst})*{tabletype#158 <- tabletype_lst}, ref_T_lst) + -- let{s_5 : store, da_lst : dataaddr*} (s_5, da_lst) = $allocdatas(s_4, OK_datatype^|data_lst|{}, byte_lst_lst) + -- let{s_6 : store, ea_lst : elemaddr*} (s_6, ea_lst) = $allocelems(s_5, $subst_all_reftype(elemtype#2, $typeuse_deftype(dt#13)*{dt#13 <- dt_lst})*{elemtype#2 <- elemtype_lst}, ref_E_lst_lst) + -- if ((s_7, fa_lst) = $allocfuncs(s_6, dt_lst[$proj_uN_0(x#5).0]*{x#5 <- x_lst}, FUNC_funccode(x#6, local_lst#84, expr_F#2)*{expr_F#2 <- expr_F_lst, local_lst#84 <- local_lst_lst, x#6 <- x_lst}, v_moduleinst^|func_lst|{})) + -- if (xi_lst = $allocexports({TYPES [], TAGS aa_I_lst ++ aa_lst, GLOBALS ga_I_lst ++ ga_lst, MEMS ma_I_lst ++ ma_lst, TABLES ta_I_lst ++ ta_lst, FUNCS fa_I_lst ++ fa_lst, DATAS [], ELEMS [], EXPORTS []}, export_lst)) + -- if (v_moduleinst = {TYPES dt_lst, TAGS aa_I_lst ++ aa_lst, GLOBALS ga_I_lst ++ ga_lst, MEMS ma_I_lst ++ ma_lst, TABLES ta_I_lst ++ ta_lst, FUNCS fa_I_lst ++ fa_lst, DATAS da_lst, ELEMS ea_lst, EXPORTS xi_lst}) + -- wf_store: `%`(s_7,) + -- wf_moduleinst: `%`(v_moduleinst,) + -- wf_module: `%`(MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)),) + -- (wf_tag: `%`(TAG_tag(tagtype#3),))*{tagtype#3 <- tagtype_lst} + -- (wf_global: `%`(GLOBAL_global(globaltype#125, expr_G#2),))*{expr_G#2 <- expr_G_lst, globaltype#125 <- globaltype_lst} + -- (wf_mem: `%`(MEMORY_mem(memtype#3),))*{memtype#3 <- memtype_lst} + -- (wf_table: `%`(TABLE_table(tabletype#159, expr_T#2),))*{expr_T#2 <- expr_T_lst, tabletype#159 <- tabletype_lst} + -- (wf_func: `%`(FUNC_func(x#7, local_lst#86, expr_F#3),))*{expr_F#3 <- expr_F_lst, local_lst#86 <- local_lst_lst, x#7 <- x_lst} + -- (wf_data: `%`(DATA_data(byte_lst#113, datamode#112),))*{byte_lst#113 <- byte_lst_lst, datamode#112 <- datamode_lst} + -- (wf_elem: `%`(ELEM_elem(elemtype#3, expr_E_lst#2, elemmode#232),))*{elemmode#232 <- elemmode_lst, elemtype#3 <- elemtype_lst, expr_E_lst#2 <- expr_E_lst_lst} + -- wf_moduleinst: `%`({TYPES [], TAGS aa_I_lst ++ aa_lst, GLOBALS ga_I_lst ++ ga_lst, MEMS ma_I_lst ++ ma_lst, TABLES ta_I_lst ++ ta_lst, FUNCS fa_I_lst ++ fa_lst, DATAS [], ELEMS [], EXPORTS []},) + -- wf_moduleinst: `%`({TYPES dt_lst, TAGS aa_I_lst ++ aa_lst, GLOBALS ga_I_lst ++ ga_lst, MEMS ma_I_lst ++ ma_lst, TABLES ta_I_lst ++ ta_lst, FUNCS fa_I_lst ++ fa_lst, DATAS da_lst, ELEMS ea_lst, EXPORTS xi_lst},) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $rundata_(v_dataidx : dataidx, v_data : data) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, v_n : nat, b_lst : byte*}(x, DATA_data(b_lst, PASSIVE_datamode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $rundata_{x : uN, v_n : nat, b_lst : byte*, y : uN, instr_lst : instr*}(x, DATA_data(b_lst, ACTIVE_datamode(y, instr_lst))) = instr_lst ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `MEMORY.INIT`_instr(y, x) `DATA.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))),) + -- wf_instr: `%`(`MEMORY.INIT`_instr(y, x),) + -- wf_instr: `%`(`DATA.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $runelem_(v_elemidx : elemidx, v_elem : elem) : instr* + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, v_n : nat, e_lst : expr*}(x, ELEM_elem(rt, e_lst, PASSIVE_elemmode)) = [] + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, v_n : nat, e_lst : expr*}(x, ELEM_elem(rt, e_lst, DECLARE_elemmode)) = [`ELEM.DROP`_instr(x)] + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $runelem_{x : uN, rt : reftype, v_n : nat, e_lst : expr*, y : uN, instr_lst : instr*}(x, ELEM_elem(rt, e_lst, ACTIVE_elemmode(y, instr_lst))) = instr_lst ++ [CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))) CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))) `TABLE.INIT`_instr(y, x) `ELEM.DROP`_instr(x)] + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(0,))),) + -- wf_instr: `%`(CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, `%`_uN(v_n,))),) + -- wf_instr: `%`(`TABLE.INIT`_instr(y, x),) + -- wf_instr: `%`(`ELEM.DROP`_instr(x),) + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:160.1-160.92 +def $evalexprs(v_state : state, var_0 : expr*) : (state, ref*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:161.1-161.34 + def $evalexprs{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:162.1-165.46 + def $evalexprs{z : state, v_expr : instr*, expr'_lst : expr*, v_ref : ref, z' : state}(z, [v_expr] ++ expr'_lst) = (z'', [v_ref] ++ ref'_lst) + -- Eval_expr: `%;%~>*%;%`(z, v_expr, z', [$val_ref(v_ref)]) + -- let{z'' : state, ref'_lst : ref*} (z'', ref'_lst) = $evalexprs(z', expr'_lst) + -- wf_ref: `%`(v_ref,) + -- wf_state: `%`(z',) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:167.1-167.96 +def $evalexprss(v_state : state, var_0 : expr**) : (state, ref**) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:168.1-168.35 + def $evalexprss{z : state}(z, []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:169.1-172.49 + def $evalexprss{z : state, expr_lst : expr*, expr'_lst_lst : expr**}(z, [expr_lst] ++ expr'_lst_lst) = (z'', [ref_lst] ++ ref'_lst_lst) + -- let{ref_lst : ref*, z' : state} (z', ref_lst) = $evalexprs(z, expr_lst) + -- let{z'' : state, ref'_lst_lst : ref**} (z'', ref'_lst_lst) = $evalexprss(z', expr'_lst_lst) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:174.1-174.111 +def $evalglobals(v_state : state, var_0 : globaltype*, var_1 : expr*) : (state, val*) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:175.1-175.41 + def $evalglobals{z : state}(z, [], []) = (z, []) + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec:176.1-181.82 + def $evalglobals{z : state, gt : globaltype, gt'_lst : globaltype*, v_expr : instr*, expr'_lst : expr*, v_val : val, z' : state}(z, [gt] ++ gt'_lst, [v_expr] ++ expr'_lst) = (z'', [v_val] ++ val'_lst) + -- Eval_expr: `%;%~>*%;%`(z, v_expr, z', [v_val]) + -- let{v_s : store, v_f : frame} `%;%`_state(v_s, v_f) = z' + -- let{s' : store, a : addr} (s', a) = $allocglobal(v_s, gt, v_val) + -- let{z'' : state, val'_lst : val*} (z'', val'_lst) = $evalglobals(`%;%`_state(s', v_f[MODULE_frame.GLOBALS_moduleinst =++ [a]]), gt'_lst, expr'_lst) + -- wf_val: `%`(v_val,) + -- wf_state: `%`(z',) + -- wf_state: `%`(`%;%`_state(v_s, v_f),) + -- wf_state: `%`(`%;%`_state(s', v_f[MODULE_frame.GLOBALS_moduleinst =++ [a]]),) +} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $instantiate(v_store : store, v_module : module, var_0 : externaddr*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $instantiate{v_s : store, v_module : module, externaddr_lst : externaddr*, xt_I_lst : externtype*, xt_E_lst : externtype*, expr_G_lst : expr*, globaltype_lst : globaltype*, expr_T_lst : expr*, tabletype_lst : tabletype*, byte_lst_lst : byte**, datamode_lst : datamode*, elemmode_lst : elemmode*, expr_E_lst_lst : expr**, reftype_lst : reftype*, x_opt : idx?, moduleinst_0 : moduleinst, z : state, i_D : nat, i_E : nat}(v_s, v_module, externaddr_lst) = `%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE v_moduleinst}), instr_E_lst ++ instr_D_lst ++ lift(instr_S_opt)) + -- Module_ok: `|-%:%`(v_module, `%->%`_moduletype(xt_I_lst, xt_E_lst)) + -- (Externaddr_ok: `%|-%:%`(v_s, externaddr#8, xt_I#2))*{externaddr#8 <- externaddr_lst, xt_I#2 <- xt_I_lst} + -- let{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*} MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)) = v_module + -- if (global_lst = GLOBAL_global(globaltype#127, expr_G#3)*{expr_G#3 <- expr_G_lst, globaltype#127 <- globaltype_lst}) + -- if (table_lst = TABLE_table(tabletype#161, expr_T#3)*{expr_T#3 <- expr_T_lst, tabletype#161 <- tabletype_lst}) + -- if (data_lst = DATA_data(byte_lst#117, datamode#116)*{byte_lst#117 <- byte_lst_lst, datamode#116 <- datamode_lst}) + -- if (elem_lst = ELEM_elem(reftype#521, expr_E_lst#3, elemmode#237)*{elemmode#237 <- elemmode_lst, expr_E_lst#3 <- expr_E_lst_lst, reftype#521 <- reftype_lst}) + -- if (start_opt = START_start(x#8)?{x#8 <- x_opt}) + -- if (moduleinst_0 = {TYPES $alloctypes(type_lst), TAGS [], GLOBALS $globalsxa(externaddr_lst), MEMS [], TABLES [], FUNCS $funcsxa(externaddr_lst) ++ (|v_s.FUNCS_store| + i_F#2)^(i_F#2<|func_lst|){}, DATAS [], ELEMS [], EXPORTS []}) + -- if (z = `%;%`_state(v_s, {LOCALS [], MODULE moduleinst_0})) + -- let{z' : state, val_G_lst : val*} (z', val_G_lst) = $evalglobals(z, globaltype_lst, expr_G_lst) + -- let{z'' : state, ref_T_lst : ref*} (z'', ref_T_lst) = $evalexprs(z', expr_T_lst) + -- let{z''' : state, ref_E_lst_lst : ref**} (z''', ref_E_lst_lst) = $evalexprss(z'', expr_E_lst_lst) + -- let{s''' : store, v_f : frame} `%;%`_state(s''', v_f) = z''' + -- let{s'''' : store, v_moduleinst : moduleinst} (s'''', v_moduleinst) = $allocmodule(s''', v_module, externaddr_lst, val_G_lst, ref_T_lst, ref_E_lst_lst) + -- let{instr_D_lst : instr*} instr_D_lst = $concat_(syntax instr, $rundata_(`%`_dataidx(i_D#1,), data_lst[i_D#1])^(i_D#1<|data_lst|){}) + -- let{instr_E_lst : instr*} instr_E_lst = $concat_(syntax instr, $runelem_(`%`_elemidx(i_E#1,), elem_lst[i_E#1])^(i_E#1<|elem_lst|){}) + -- let{instr_S_opt : instr?} instr_S_opt = CALL_instr(x#9)?{x#9 <- x_opt} + -- wf_state: `%`(z,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(s'''', {LOCALS [], MODULE v_moduleinst}), instr_E_lst ++ instr_D_lst ++ lift(instr_S_opt)),) + -- wf_moduletype: `%`(`%->%`_moduletype(xt_I_lst, xt_E_lst),) + -- wf_module: `%`(MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)),) + -- (wf_global: `%`(GLOBAL_global(globaltype#130, expr_G#5),))*{expr_G#5 <- expr_G_lst, globaltype#130 <- globaltype_lst} + -- (wf_table: `%`(TABLE_table(tabletype#163, expr_T#5),))*{expr_T#5 <- expr_T_lst, tabletype#163 <- tabletype_lst} + -- (wf_data: `%`(DATA_data(byte_lst#119, datamode#118),))*{byte_lst#119 <- byte_lst_lst, datamode#118 <- datamode_lst} + -- (wf_elem: `%`(ELEM_elem(reftype#523, expr_E_lst#5, elemmode#239),))*{elemmode#239 <- elemmode_lst, expr_E_lst#5 <- expr_E_lst_lst, reftype#523 <- reftype_lst} + -- (wf_start: `%`(START_start(x#10),))?{x#10 <- x_opt} + -- wf_moduleinst: `%`({TYPES $alloctypes(type_lst), TAGS [], GLOBALS $globalsxa(externaddr_lst), MEMS [], TABLES [], FUNCS $funcsxa(externaddr_lst) ++ (|v_s.FUNCS_store| + i_F#3)^(i_F#3<|func_lst|){}, DATAS [], ELEMS [], EXPORTS []},) + -- wf_state: `%`(`%;%`_state(v_s, {LOCALS [], MODULE moduleinst_0}),) + -- wf_state: `%`(`%;%`_state(s''', v_f),) + -- (wf_uN: `%%`(32, `%`_uN(i_D#2,)))^(i_D#2<|data_lst|){} + -- (wf_uN: `%%`(32, `%`_uN(i_E#2,)))^(i_E#2<|elem_lst|){} + -- (wf_instr: `%`(CALL_instr(x#11),))?{x#11 <- x_opt} + +;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec +def $invoke(v_store : store, v_funcaddr : funcaddr, var_0 : val*) : config + ;; ../../../../specification/wasm-3.0/4.4-execution.modules.spectec + def $invoke{v_s : store, v_funcaddr : nat, val_lst : val*, t_1_lst : valtype*, t_2_lst : valtype*}(v_s, v_funcaddr, val_lst) = `%;%`_config(`%;%`_state(v_s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(v_val)*{v_val <- val_lst} ++ [`REF.FUNC_ADDR`_instr(v_funcaddr) CALL_REF_instr($typeuse_deftype(v_s.FUNCS_store[v_funcaddr].TYPE_funcinst))]) + -- Expand: `%~~%`(v_s.FUNCS_store[v_funcaddr].TYPE_funcinst, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- (Val_ok: `%|-%:%`(v_s, val#3, t_1#8))*{t_1#8 <- t_1_lst, val#3 <- val_lst} + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, {LOCALS [], MODULE {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], EXPORTS []}}), $instr_val(val#4)*{val#4 <- val_lst} ++ [`REF.FUNC_ADDR`_instr(v_funcaddr) CALL_REF_instr($typeuse_deftype(v_s.FUNCS_store[v_funcaddr].TYPE_funcinst))]),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax castop = (null?, null?) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +syntax memidxop = (memidx, memarg) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax startopt = start* + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax code = (local*, expr) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +syntax nopt = u32* + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +def $ieee_(v_N : N, rat : rat) : fNmag + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax idctxt = +{ + TYPES name?*, + TAGS name?*, + GLOBALS name?*, + MEMS name?*, + TABLES name?*, + FUNCS name?*, + DATAS name?*, + ELEMS name?*, + LOCALS name?*, + LABELS name?*, + FIELDS name?**, + TYPEDEFS deftype?* +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation wf_idctxt: `%`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule idctxt_case_{var_0 : name?*, var_1 : name?*, var_2 : name?*, var_3 : name?*, var_4 : name?*, var_5 : name?*, var_6 : name?*, var_7 : name?*, var_8 : name?*, var_9 : name?*, var_10 : name?**, var_11 : deftype?*}: + `%`({TYPES var_0, TAGS var_1, GLOBALS var_2, MEMS var_3, TABLES var_4, FUNCS var_5, DATAS var_6, ELEMS var_7, LOCALS var_8, LABELS var_9, FIELDS var_10, TYPEDEFS var_11},) + -- (wf_name: `%`(var_0,))?{var_0 <- var_0}*{var_0 <- var_0} + -- (wf_name: `%`(var_1,))?{var_1 <- var_1}*{var_1 <- var_1} + -- (wf_name: `%`(var_2,))?{var_2 <- var_2}*{var_2 <- var_2} + -- (wf_name: `%`(var_3,))?{var_3 <- var_3}*{var_3 <- var_3} + -- (wf_name: `%`(var_4,))?{var_4 <- var_4}*{var_4 <- var_4} + -- (wf_name: `%`(var_5,))?{var_5 <- var_5}*{var_5 <- var_5} + -- (wf_name: `%`(var_6,))?{var_6 <- var_6}*{var_6 <- var_6} + -- (wf_name: `%`(var_7,))?{var_7 <- var_7}*{var_7 <- var_7} + -- (wf_name: `%`(var_8,))?{var_8 <- var_8}*{var_8 <- var_8} + -- (wf_name: `%`(var_9,))?{var_9 <- var_9}*{var_9 <- var_9} + -- (wf_name: `%`(var_10,))?{var_10 <- var_10}*{var_10 <- var_10}*{var_10 <- var_10} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +syntax I = idctxt + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:154.1-154.56 +def $concat_idctxt(var_0 : idctxt*) : idctxt + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:155.1-155.29 + def $concat_idctxt([]) = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} + -- wf_idctxt: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []},) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:156.1-156.53 + def $concat_idctxt{v_I : idctxt, I'_lst : I*}([v_I] ++ I'_lst) = v_I +++ $concat_idctxt(I'_lst) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +relation Idctxt_ok: `|-%:OK`(idctxt,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + rule mk_Idctxt_ok{v_I : I, field_lst_lst : char**}: + `|-%:OK`(v_I,) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.TYPES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.TAGS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.GLOBALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.MEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.TABLES_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.FUNCS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.DATAS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.ELEMS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.LOCALS_I)) + -- if $disjoint_(syntax name, $concatopt_(syntax name, v_I.LABELS_I)) + -- (if $disjoint_(syntax name, $concatopt_(syntax name, [?(`%`_name(field_lst,))])))*{field_lst <- field_lst_lst} + -- if ([?(`%`_name(field_lst,))*{field_lst <- field_lst_lst}] = v_I.FIELDS_I) + -- wf_idctxt: `%`(v_I,) + -- (wf_name: `%`(`%`_name(field_lst,),))*{field_lst <- field_lst_lst} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $dots : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +syntax decl = + | TYPE(rectype) + | IMPORT(v_name : name, v_name : name, v_externtype : externtype) + | TAG(tagtype) + | GLOBAL(v_globaltype : globaltype, v_expr : expr) + | MEMORY(memtype) + | TABLE(v_tabletype : tabletype, v_expr : expr) + | FUNC(v_typeidx : typeidx, local_lst : local*, v_expr : expr) + | DATA(byte_lst : byte*, v_datamode : datamode) + | ELEM(v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode) + | START(funcidx) + | EXPORT(v_name : name, v_externidx : externidx) + +def $decl_data(var_0 : data) : decl + def $decl_data{x0 : byte*, x1 : datamode}(DATA_data(x0, x1)) = DATA_decl(x0, x1) + +def $decl_elem(var_0 : elem) : decl + def $decl_elem{x0 : reftype, x1 : expr*, x2 : elemmode}(ELEM_elem(x0, x1, x2)) = ELEM_decl(x0, x1, x2) + +def $decl_export(var_0 : export) : decl + def $decl_export{x0 : name, x1 : externidx}(EXPORT_export(x0, x1)) = EXPORT_decl(x0, x1) + +def $decl_func(var_0 : func) : decl + def $decl_func{x0 : typeidx, x1 : local*, x2 : expr}(FUNC_func(x0, x1, x2)) = FUNC_decl(x0, x1, x2) + +def $decl_global(var_0 : global) : decl + def $decl_global{x0 : globaltype, x1 : expr}(GLOBAL_global(x0, x1)) = GLOBAL_decl(x0, x1) + +def $decl_import(var_0 : import) : decl + def $decl_import{x0 : name, x1 : name, x2 : externtype}(IMPORT_import(x0, x1, x2)) = IMPORT_decl(x0, x1, x2) + +def $decl_mem(var_0 : mem) : decl + def $decl_mem{x : memtype}(MEMORY_mem(x)) = MEMORY_decl(x) + +def $decl_start(var_0 : start) : decl + def $decl_start{x : funcidx}(START_start(x)) = START_decl(x) + +def $decl_table(var_0 : table) : decl + def $decl_table{x0 : tabletype, x1 : expr}(TABLE_table(x0, x1)) = TABLE_decl(x0, x1) + +def $decl_tag(var_0 : tag) : decl + def $decl_tag{x : tagtype}(TAG_tag(x)) = TAG_decl(x) + +def $decl_type(var_0 : type) : decl + def $decl_type{x : rectype}(TYPE_type(x)) = TYPE_decl(x) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +relation wf_decl: `%`(decl,) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_0{var_0 : rectype}: + `%`(TYPE_decl(var_0),) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_1{v_name : name, name_0 : name, v_externtype : externtype}: + `%`(IMPORT_decl(v_name, name_0, v_externtype),) + -- wf_name: `%`(v_name,) + -- wf_name: `%`(name_0,) + -- wf_externtype: `%`(v_externtype,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_2{var_0 : tagtype}: + `%`(TAG_decl(var_0),) + -- wf_typeuse: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_3{v_globaltype : globaltype, v_expr : expr}: + `%`(GLOBAL_decl(v_globaltype, v_expr),) + -- wf_globaltype: `%`(v_globaltype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_4{var_0 : memtype}: + `%`(MEMORY_decl(var_0),) + -- wf_memtype: `%`(var_0,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_5{v_tabletype : tabletype, v_expr : expr}: + `%`(TABLE_decl(v_tabletype, v_expr),) + -- wf_tabletype: `%`(v_tabletype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_6{v_typeidx : typeidx, local_lst : local*, v_expr : expr}: + `%`(FUNC_decl(v_typeidx, local_lst, v_expr),) + -- wf_uN: `%%`(32, v_typeidx) + -- (wf_local: `%`(v_local,))*{v_local <- local_lst} + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr} + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_7{byte_lst : byte*, v_datamode : datamode}: + `%`(DATA_decl(byte_lst, v_datamode),) + -- (wf_byte: `%`(v_byte,))*{v_byte <- byte_lst} + -- wf_datamode: `%`(v_datamode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_8{v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode}: + `%`(ELEM_decl(v_reftype, expr_lst, v_elemmode),) + -- wf_reftype: `%`(v_reftype,) + -- (wf_instr: `%`(v_expr,))*{v_expr <- v_expr}*{v_expr <- expr_lst} + -- wf_elemmode: `%`(v_elemmode,) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_9{var_0 : funcidx}: + `%`(START_decl(var_0),) + -- wf_uN: `%%`(32, var_0) + + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + rule decl_case_10{v_name : name, v_externidx : externidx}: + `%`(EXPORT_decl(v_name, v_externidx),) + -- wf_name: `%`(v_name,) + -- wf_externidx: `%`(v_externidx,) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:258.1-258.76 +def $typesd(var_0 : decl*) : type* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:270.1-270.23 + def $typesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:271.1-271.48 + def $typesd{var_0 : rectype, decl'_lst : decl*}([TYPE_decl(var_0)] ++ decl'_lst) = [TYPE_type(var_0)] ++ $typesd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:272.1-272.57 + def $typesd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $typesd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:259.1-259.78 +def $importsd(var_0 : decl*) : import* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:274.1-274.25 + def $importsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:275.1-275.56 + def $importsd{v_name : name, name_0 : name, v_externtype : externtype, decl'_lst : decl*}([IMPORT_decl(v_name, name_0, v_externtype)] ++ decl'_lst) = [IMPORT_import(v_name, name_0, v_externtype)] ++ $importsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:276.1-276.61 + def $importsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $importsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:260.1-260.75 +def $tagsd(var_0 : decl*) : tag* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:278.1-278.22 + def $tagsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:279.1-279.44 + def $tagsd{var_0 : tagtype, decl'_lst : decl*}([TAG_decl(var_0)] ++ decl'_lst) = [TAG_tag(var_0)] ++ $tagsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:280.1-280.55 + def $tagsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $tagsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:261.1-261.78 +def $globalsd(var_0 : decl*) : global* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:282.1-282.25 + def $globalsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:283.1-283.56 + def $globalsd{v_globaltype : globaltype, v_expr : expr, decl'_lst : decl*}([GLOBAL_decl(v_globaltype, v_expr)] ++ decl'_lst) = [GLOBAL_global(v_globaltype, v_expr)] ++ $globalsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:284.1-284.61 + def $globalsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $globalsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:262.1-262.75 +def $memsd(var_0 : decl*) : mem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:286.1-286.22 + def $memsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:287.1-287.44 + def $memsd{var_0 : memtype, decl'_lst : decl*}([MEMORY_decl(var_0)] ++ decl'_lst) = [MEMORY_mem(var_0)] ++ $memsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:288.1-288.55 + def $memsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $memsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:263.1-263.77 +def $tablesd(var_0 : decl*) : table* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:290.1-290.24 + def $tablesd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:291.1-291.52 + def $tablesd{v_tabletype : tabletype, v_expr : expr, decl'_lst : decl*}([TABLE_decl(v_tabletype, v_expr)] ++ decl'_lst) = [TABLE_table(v_tabletype, v_expr)] ++ $tablesd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:292.1-292.59 + def $tablesd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $tablesd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:264.1-264.76 +def $funcsd(var_0 : decl*) : func* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:294.1-294.23 + def $funcsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:295.1-295.48 + def $funcsd{v_typeidx : typeidx, local_lst : local*, v_expr : expr, decl'_lst : decl*}([FUNC_decl(v_typeidx, local_lst, v_expr)] ++ decl'_lst) = [FUNC_func(v_typeidx, local_lst, v_expr)] ++ $funcsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:296.1-296.57 + def $funcsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $funcsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:265.1-265.76 +def $datasd(var_0 : decl*) : data* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:298.1-298.23 + def $datasd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:299.1-299.48 + def $datasd{byte_lst : byte*, v_datamode : datamode, decl'_lst : decl*}([DATA_decl(byte_lst, v_datamode)] ++ decl'_lst) = [DATA_data(byte_lst, v_datamode)] ++ $datasd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:300.1-300.57 + def $datasd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $datasd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:266.1-266.76 +def $elemsd(var_0 : decl*) : elem* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:302.1-302.23 + def $elemsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:303.1-303.48 + def $elemsd{v_reftype : reftype, expr_lst : expr*, v_elemmode : elemmode, decl'_lst : decl*}([ELEM_decl(v_reftype, expr_lst, v_elemmode)] ++ decl'_lst) = [ELEM_elem(v_reftype, expr_lst, v_elemmode)] ++ $elemsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:304.1-304.57 + def $elemsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $elemsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:267.1-267.77 +def $startsd(var_0 : decl*) : start* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:306.1-306.24 + def $startsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:307.1-307.52 + def $startsd{var_0 : funcidx, decl'_lst : decl*}([START_decl(var_0)] ++ decl'_lst) = [START_start(var_0)] ++ $startsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:308.1-308.59 + def $startsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $startsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:268.1-268.78 +def $exportsd(var_0 : decl*) : export* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:310.1-310.25 + def $exportsd([]) = [] + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:311.1-311.56 + def $exportsd{v_name : name, v_externidx : externidx, decl'_lst : decl*}([EXPORT_decl(v_name, v_externidx)] ++ decl'_lst) = [EXPORT_export(v_name, v_externidx)] ++ $exportsd(decl'_lst) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec:312.1-312.61 + def $exportsd{v_decl : decl, decl'_lst : decl*}([v_decl] ++ decl'_lst) = $exportsd(decl'_lst) +} + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +def $ordered(var_0 : decl*) : bool + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{decl_lst : decl*}(decl_lst) = true + -- if ($importsd(decl_lst) = []) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + def $ordered{v_name : name, name_0 : name, v_externtype : externtype, decl_1_lst : decl*, decl_2_lst : decl*}(decl_1_lst ++ [IMPORT_decl(v_name, name_0, v_externtype)] ++ decl_2_lst) = (((((($importsd(decl_1_lst) = []) /\ ($tagsd(decl_1_lst) = [])) /\ ($globalsd(decl_1_lst) = [])) /\ ($memsd(decl_1_lst) = [])) /\ ($tablesd(decl_1_lst) = [])) /\ ($funcsd(decl_1_lst) = [])) + +;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec +relation Context_ok: `|-%:OK`(context,) + ;; ../../../../specification/wasm-3.0/7.0-soundness.contexts.spectec + rule mk_Context_ok{C : context, v_n : n, dt_lst : deftype*, jt_lst : tagtype*, gt_lst : globaltype*, mt_lst : memtype*, tt_lst : tabletype*, dt_F_lst : deftype*, ok_lst : datatype*, et_lst : elemtype*, lct_lst : localtype*, t_lst_lst : valtype**, t'_lst_opt : valtype*?, x_lst : idx*, v_m : m, st_lst : subtype*, C_0 : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `|-%:OK`(C,) + -- if (C = {TYPES dt_lst, TAGS jt_lst, GLOBALS gt_lst, MEMS mt_lst, TABLES tt_lst, FUNCS dt_F_lst, DATAS ok_lst, ELEMS et_lst, LOCALS lct_lst, LABELS `%`_resulttype(t_lst,)*{t_lst <- t_lst_lst}, RETURN `%`_resulttype(t'_lst,)?{t'_lst <- t'_lst_opt}, REFS x_lst, RECS st_lst}) + -- if (C_0 = {TYPES dt_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}) + -- (Deftype_ok: `%|-%:OK`({TYPES dt_lst[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],))))*{dt_F <- dt_F_lst, t_1 <- t_1_lst, t_2 <- t_2_lst} + -- (Reftype_ok: `%|-%:OK`(C_0, et))*{et <- et_lst} + -- (Localtype_ok: `%|-%:OK`(C_0, lct))*{lct <- lct_lst} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t_lst,)))*{t_lst <- t_lst_lst} + -- (Resulttype_ok: `%|-%:OK`(C_0, `%`_resulttype(t'_lst,)))?{t'_lst <- t'_lst_opt} + -- (if ($proj_uN_0(x).0 < |dt_F_lst|))*{x <- x_lst} + -- wf_context: `%`(C,) + -- wf_context: `%`(C_0,) + -- wf_context: `%`({TYPES dt_lst, TAGS jt_lst, GLOBALS gt_lst, MEMS mt_lst, TABLES tt_lst, FUNCS dt_F_lst, DATAS ok_lst, ELEMS et_lst, LOCALS lct_lst, LABELS `%`_resulttype(t_lst,)*{t_lst <- t_lst_lst}, RETURN `%`_resulttype(t'_lst,)?{t'_lst <- t'_lst_opt}, REFS x_lst, RECS st_lst},) + -- wf_context: `%`({TYPES dt_lst, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + -- (wf_context: `%`({TYPES dt_lst[0 : i], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},))^(i%`_comptype(`%`_resulttype([t_1],), `%`_resulttype([t_2],)),))*{t_1 <- t_1_lst, t_2 <- t_2_lst} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Localval_ok: `%|-%:%`(store, val?, localtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule set{v_s : store, v_val : val, t : valtype}: + `%|-%:%`(v_s, ?(v_val), `%%`_localtype(SET_init, t)) + -- Val_ok: `%|-%:%`(v_s, v_val, t) + -- wf_store: `%`(v_s,) + -- wf_val: `%`(v_val,) + -- wf_localtype: `%`(`%%`_localtype(SET_init, t),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule unset{v_s : store, t : valtype}: + `%|-%:%`(v_s, ?(), `%%`_localtype(UNSET_init, t)) + -- Valtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, t) + -- wf_store: `%`(v_s,) + -- wf_localtype: `%`(`%%`_localtype(UNSET_init, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Datainst_ok: `%|-%:%`(store, datainst, datatype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Datainst_ok{v_s : store, b_lst : byte*}: + `%|-%:%`(v_s, {BYTES b_lst}, OK_datatype) + -- wf_store: `%`(v_s,) + -- wf_datainst: `%`({BYTES b_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Eleminst_ok{v_s : store, rt : reftype, ref_lst : ref*}: + `%|-%:%`(v_s, {TYPE rt, REFS ref_lst}, rt) + -- Reftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, rt) + -- (Ref_ok: `%|-%:%`(v_s, v_ref, rt))*{v_ref <- ref_lst} + -- wf_store: `%`(v_s,) + -- wf_eleminst: `%`({TYPE rt, REFS ref_lst},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exportinst_ok: `%|-%:OK`(store, exportinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Exportinst_ok{v_s : store, nm : name, xa : externaddr, xt : externtype}: + `%|-%:OK`(v_s, {NAME nm, ADDR xa}) + -- Externaddr_ok: `%|-%:%`(v_s, xa, xt) + -- wf_store: `%`(v_s,) + -- wf_externtype: `%`(xt,) + -- wf_exportinst: `%`({NAME nm, ADDR xa},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Moduleinst_ok: `%|-%:%`(store, moduleinst, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Moduleinst_ok{v_s : store, deftype_lst : deftype*, tagaddr_lst : tagaddr*, globaladdr_lst : globaladdr*, memaddr_lst : memaddr*, tableaddr_lst : tableaddr*, funcaddr_lst : funcaddr*, dataaddr_lst : dataaddr*, elemaddr_lst : elemaddr*, exportinst_lst : exportinst*, tagtype_lst : tagtype*, globaltype_lst : globaltype*, memtype_lst : memtype*, tabletype_lst : tabletype*, deftype_F_lst : deftype*, datatype_lst : datatype*, elemtype_lst : elemtype*, k : nat, subtype_lst : subtype*}: + `%|-%:%`(v_s, {TYPES deftype_lst, TAGS tagaddr_lst, GLOBALS globaladdr_lst, MEMS memaddr_lst, TABLES tableaddr_lst, FUNCS funcaddr_lst, DATAS dataaddr_lst, ELEMS elemaddr_lst, EXPORTS exportinst_lst}, {TYPES deftype_lst, TAGS tagtype_lst, GLOBALS globaltype_lst, MEMS memtype_lst, TABLES tabletype_lst, FUNCS deftype_F_lst, DATAS datatype_lst, ELEMS elemtype_lst, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i 0) + -- (if (v_exportinst.ADDR_exportinst <- TAG_externaddr(v_tagaddr)*{v_tagaddr <- tagaddr_lst} ++ GLOBAL_externaddr(v_globaladdr)*{v_globaladdr <- globaladdr_lst} ++ MEM_externaddr(v_memaddr)*{v_memaddr <- memaddr_lst} ++ TABLE_externaddr(v_tableaddr)*{v_tableaddr <- tableaddr_lst} ++ FUNC_externaddr(v_funcaddr)*{v_funcaddr <- funcaddr_lst}))*{v_exportinst <- exportinst_lst} + -- if (k <= |funcaddr_lst|) + -- wf_store: `%`(v_s,) + -- wf_moduleinst: `%`({TYPES deftype_lst, TAGS tagaddr_lst, GLOBALS globaladdr_lst, MEMS memaddr_lst, TABLES tableaddr_lst, FUNCS funcaddr_lst, DATAS dataaddr_lst, ELEMS elemaddr_lst, EXPORTS exportinst_lst},) + -- wf_context: `%`({TYPES deftype_lst, TAGS tagtype_lst, GLOBALS globaltype_lst, MEMS memtype_lst, TABLES tabletype_lst, FUNCS deftype_F_lst, DATAS datatype_lst, ELEMS elemtype_lst, LOCALS [], LABELS [], RETURN ?(), REFS `%`_funcidx(i,)^(i_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Instr_ok: `%|-%:%`(C, v_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(v_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:14.1-17.43 + rule call_ref{v_s : store, C : context, yy : typeuse, t_1_lst : valtype*, t_2_lst : valtype*}: + `%;%|-%:%`(v_s, C, CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2_lst,))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_2_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:20.1-26.42 + rule return_call_ref{v_s : store, C : context, yy : typeuse, t_3_lst : valtype*, t_1_lst : valtype*, t_4_lst : valtype*, t_2_lst : valtype*, t'_2_lst : valtype*}: + `%;%|-%:%`(v_s, C, RETURN_CALL_REF_instr(yy), `%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4_lst,))) + -- Typeuse_ok: `%|-%:OK`(C, yy) + -- Expand_use: `%~~_%%`(yy, C, `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,))) + -- if (C.RETURN_context = ?(`%`_resulttype(t'_2_lst,))) + -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2_lst,), `%`_resulttype(t'_2_lst,)) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- (wf_valtype: `%`(t'_2,))*{t'_2 <- t'_2_lst} + -- wf_instr: `%`(RETURN_CALL_REF_instr(yy),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst ++ t_1_lst ++ [REF_valtype(?(NULL_null), $heaptype_typeuse(yy))],), [], `%`_resulttype(t_4_lst,)),) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_3_lst,), [], `%`_resulttype(t_4_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:28.1-30.27 + rule ref{v_s : store, C : context, v_ref : ref, rt : reftype}: + `%;%|-%:%`(v_s, C, $instr_ref(v_ref), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],))) + -- Ref_ok: `%|-%:%`(v_s, v_ref, rt) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_ref: `%`(v_ref,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([$valtype_reftype(rt)],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:32.1-35.68 + rule label{v_s : store, C : context, v_n : n, instr'_lst : instr*, instr_lst : instr*, t_lst : valtype*, t'_lst : valtype*, x'_lst : idx*, x_lst : idx*}: + `%;%|-%:%`(v_s, C, `LABEL_%{%}%`_instr(v_n, instr'_lst, instr_lst), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,))) + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr'_lst, `%->_%%`_instrtype(`%`_resulttype(t'_lst,), x'_lst, `%`_resulttype(t_lst,))) + -- Instrs_ok2: `%;%|-%:%`(v_s, {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_lst, `%->_%%`_instrtype(`%`_resulttype([],), x_lst, `%`_resulttype(t_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`LABEL_%{%}%`_instr(v_n, instr'_lst, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t'_lst,), x'_lst, `%`_resulttype(t_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t'_lst,)], RETURN ?(), REFS [], RECS []},) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x_lst, `%`_resulttype(t_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:37.1-42.35 + rule frame{v_s : store, C : context, v_n : n, v_f : frame, instr_lst : instr*, t_lst : valtype*, C' : context}: + `%;%|-%:%`(v_s, C, `FRAME_%{%}%`_instr(v_n, v_f, instr_lst), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,))) + -- Frame_ok: `%|-%:%`(v_s, v_f, C') + -- if (C'.RETURN_context = ?(`%`_resulttype(t_lst,))) + -- Expr_ok2: `%;%|-%:%`(v_s, C', instr_lst, `%`_resulttype(t_lst,)) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t_lst,)) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_context: `%`(C',) + -- wf_instr: `%`(`FRAME_%{%}%`_instr(v_n, v_f, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:44.1-47.49 + rule handler{v_s : store, C : context, v_n : n, catch_lst : catch*, instr_lst : instr*, t_lst : valtype*, x_lst : idx*}: + `%;%|-%:%`(v_s, C, `HANDLER_%{%}%`_instr(v_n, catch_lst, instr_lst), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,))) + -- (Catch_ok: `%|-%:OK`(C, v_catch))*{v_catch <- catch_lst} + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr_lst, `%->_%%`_instrtype(`%`_resulttype([],), x_lst, `%`_resulttype(t_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`HANDLER_%{%}%`_instr(v_n, catch_lst, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), x_lst, `%`_resulttype(t_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:49.1-51.42 + rule trap{v_s : store, C : context, t_1_lst : valtype*, t_2_lst : valtype*}: + `%;%|-%:%`(v_s, C, TRAP_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(TRAP_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:5.1-6.36 +relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:54.1-55.27 + rule empty{v_s : store, C : context}: + `%;%|-%:%`(v_s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:57.1-59.50 + rule instr{v_s : store, C : context, v_instr : instr, t_1_lst : valtype*, x_lst : idx*, t_2_lst : valtype*}: + `%;%|-%:%`(v_s, C, [v_instr], `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Instr_ok2: `%;%|-%:%`(v_s, C, v_instr, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_instr: `%`(v_instr,) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:61.1-65.86 + rule seq{v_s : store, C : context, instr_1_lst : instr*, instr_2_lst : instr*, t_1_lst : valtype*, x_1_lst : idx*, x_2_lst : idx*, t_3_lst : valtype*, t_2_lst : valtype*, init_lst : init*, t_lst : valtype*}: + `%;%|-%:%`(v_s, C, instr_1_lst ++ instr_2_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst ++ x_2_lst, `%`_resulttype(t_3_lst,))) + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr_1_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,))) + -- if (|init_lst| = |t_lst|) + -- if (|init_lst| = |x_1_lst|) + -- (if ($proj_uN_0(x_1).0 < |C.LOCALS_context|))*{x_1 <- x_1_lst} + -- (if (C.LOCALS_context[$proj_uN_0(x_1).0] = `%%`_localtype(v_init, t)))*{v_init <- init_lst, t <- t_lst, x_1 <- x_1_lst} + -- if ($with_locals(C, x_1_lst, `%%`_localtype(SET_init, t)*{t <- t_lst}) =/= ?()) + -- Instrs_ok2: `%;%|-%:%`(v_s, !($with_locals(C, x_1_lst, `%%`_localtype(SET_init, t)*{t <- t_lst})), instr_2_lst, `%->_%%`_instrtype(`%`_resulttype(t_2_lst,), x_2_lst, `%`_resulttype(t_3_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(instr_1,))*{instr_1 <- instr_1_lst} + -- (wf_instr: `%`(instr_2,))*{instr_2 <- instr_2_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst ++ x_2_lst, `%`_resulttype(t_3_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_1_lst, `%`_resulttype(t_2_lst,)),) + -- (wf_localtype: `%`(`%%`_localtype(v_init, t),))*{v_init <- init_lst, t <- t_lst} + -- (wf_localtype: `%`(`%%`_localtype(SET_init, t),))*{t <- t_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_2_lst,), x_2_lst, `%`_resulttype(t_3_lst,)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:67.1-71.33 + rule sub{v_s : store, C : context, instr_lst : instr*, it' : instrtype, it : instrtype}: + `%;%|-%:%`(v_s, C, instr_lst, it') + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr_lst, it) + -- Instrtype_sub: `%|-%<:%`(C, it, it') + -- Instrtype_ok: `%|-%:OK`(C, it') + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(it',) + -- wf_instrtype: `%`(it,) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:74.1-77.33 + rule frame{v_s : store, C : context, instr_lst : instr*, t_lst : valtype*, t_1_lst : valtype*, x_lst : idx*, t_2_lst : valtype*}: + `%;%|-%:%`(v_s, C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_lst ++ t_1_lst,), x_lst, `%`_resulttype(t_lst ++ t_2_lst,))) + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,))) + -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_lst,)) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_lst ++ t_1_lst,), x_lst, `%`_resulttype(t_lst ++ t_2_lst,)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), x_lst, `%`_resulttype(t_2_lst,)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:7.1-8.36 +relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:80.1-82.44 + rule mk_Expr_ok2{v_s : store, C : context, instr_lst : instr*, t_lst : valtype*}: + `%;%|-%:%`(v_s, C, instr_lst, `%`_resulttype(t_lst,)) + -- Instrs_ok2: `%;%|-%:%`(v_s, C, instr_lst, `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,))) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype(t_lst,)),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Taginst_ok: `%|-%:%`(store, taginst, tagtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Taginst_ok{v_s : store, jt : tagtype}: + `%|-%:%`(v_s, {TYPE jt}, jt) + -- Tagtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, jt) + -- wf_store: `%`(v_s,) + -- wf_taginst: `%`({TYPE jt},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Globalinst_ok: `%|-%:%`(store, globalinst, globaltype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Globalinst_ok{v_s : store, mut_opt : mut?, t : valtype, v_val : val}: + `%|-%:%`(v_s, {TYPE `%%`_globaltype(mut_opt, t), VALUE v_val}, `%%`_globaltype(mut_opt, t)) + -- Globaltype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%`_globaltype(mut_opt, t)) + -- Val_ok: `%|-%:%`(v_s, v_val, t) + -- wf_store: `%`(v_s,) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut_opt, t), VALUE v_val},) + -- wf_globaltype: `%`(`%%`_globaltype(mut_opt, t),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Meminst_ok: `%|-%:%`(store, meminst, memtype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Meminst_ok{v_s : store, at : addrtype, v_n : n, m_opt : m?, b_lst : byte*}: + `%|-%:%`(v_s, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b_lst}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}))) + -- Memtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}))) + -- if (|b_lst| = (v_n * (64 * $Ki))) + -- wf_store: `%`(v_s,) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b_lst},) + -- wf_memtype: `%`(`%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt})),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Tableinst_ok: `%|-%:%`(store, tableinst, tabletype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Tableinst_ok{v_s : store, at : addrtype, v_n : n, m_opt : m?, rt : reftype, ref_lst : ref*}: + `%|-%:%`(v_s, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref_lst}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt)) + -- Tabletype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt)) + -- if (|ref_lst| = v_n) + -- (Ref_ok: `%|-%:%`(v_s, v_ref, rt))*{v_ref <- ref_lst} + -- wf_store: `%`(v_s,) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref_lst},) + -- wf_tabletype: `%`(`%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Funcinst_ok: `%|-%:%`(store, funcinst, deftype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Funcinst_ok{v_s : store, dt : deftype, v_moduleinst : moduleinst, v_func : func, C : context, dt' : deftype}: + `%|-%:%`(v_s, {TYPE dt, MODULE v_moduleinst, CODE $funccode_func(v_func)}, dt) + -- Deftype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, dt) + -- Moduleinst_ok: `%|-%:%`(v_s, v_moduleinst, C) + -- Func_ok: `%|-%:%`(C, v_func, dt') + -- Deftype_sub: `%|-%<:%`(C, dt', dt) + -- wf_store: `%`(v_s,) + -- wf_context: `%`(C,) + -- wf_funcinst: `%`({TYPE dt, MODULE v_moduleinst, CODE $funccode_func(v_func)},) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Structinst_ok: `%|-%:OK`(store, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Structinst_ok{v_s : store, dt : deftype, fv_lst : fieldval*, mut_opt_lst : mut?*, zt_lst : storagetype*}: + `%|-%:OK`(v_s, {TYPE dt, FIELDS fv_lst}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- if (|fv_lst| = |zt_lst|) + -- (Fieldval_ok: `%|-%:%`(v_s, fv, zt))*{fv <- fv_lst, zt <- zt_lst} + -- wf_store: `%`(v_s,) + -- wf_structinst: `%`({TYPE dt, FIELDS fv_lst},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Arrayinst_ok: `%|-%:OK`(store, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Arrayinst_ok{v_s : store, dt : deftype, fv_lst : fieldval*, mut_opt : mut?, zt : storagetype}: + `%|-%:OK`(v_s, {TYPE dt, FIELDS fv_lst}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- (Fieldval_ok: `%|-%:%`(v_s, fv, zt))*{fv <- fv_lst} + -- wf_store: `%`(v_s,) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv_lst},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Exninst_ok: `%|-%:OK`(store, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Exninst_ok{v_s : store, ta : tagaddr, val_lst : val*, dt : deftype, t_lst : valtype*}: + `%|-%:OK`(v_s, {TAG ta, FIELDS val_lst}) + -- if (ta < |v_s.TAGS_store|) + -- if ($typeuse_deftype(dt) = v_s.TAGS_store[ta].TYPE_taginst) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],))) + -- if (|t_lst| = |val_lst|) + -- (Val_ok: `%|-%:%`(v_s, v_val, t))*{t <- t_lst, v_val <- val_lst} + -- wf_store: `%`(v_s,) + -- wf_exninst: `%`({TAG ta, FIELDS val_lst},) + -- wf_comptype: `%`(`FUNC%->%`_comptype(`%`_resulttype(t_lst,), `%`_resulttype([],)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +rec { + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:230.1-231.50 +relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:244.1-247.35 + rule trans{fv_1 : fieldval, v_s : store, fv_2 : fieldval, fv' : fieldval}: + `%>>_%%`(fv_1, v_s, fv_2) + -- ImmutReachable: `%>>_%%`(fv_1, v_s, fv') + -- ImmutReachable: `%>>_%%`(fv', v_s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(fv_2,) + -- wf_fieldval: `%`(fv',) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:249.1-252.20 + rule ref_struct{a : addr, v_s : store, i : nat, ft_lst : fieldtype*, zt : storagetype}: + `%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), v_s, v_s.STRUCTS_store[a].FIELDS_structinst[i]) + -- if (i < |v_s.STRUCTS_store[a].FIELDS_structinst|) + -- if (a < |v_s.STRUCTS_store|) + -- Expand: `%~~%`(v_s.STRUCTS_store[a].TYPE_structinst, STRUCT_comptype(`%`_list(ft_lst,))) + -- if (i < |ft_lst|) + -- if (ft_lst[i] = `%%`_fieldtype(?(), zt)) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(ft_lst,)),) + -- wf_fieldtype: `%`(`%%`_fieldtype(?(), zt),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:254.1-256.42 + rule ref_array{a : addr, v_s : store, i : nat, zt : storagetype}: + `%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), v_s, v_s.ARRAYS_store[a].FIELDS_arrayinst[i]) + -- if (i < |v_s.ARRAYS_store[a].FIELDS_arrayinst|) + -- if (a < |v_s.ARRAYS_store|) + -- Expand: `%~~%`(v_s.ARRAYS_store[a].TYPE_arrayinst, ARRAY_comptype(`%%`_fieldtype(?(), zt))) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(?(), zt)),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:258.1-259.44 + rule ref_exn{a : addr, v_s : store, i : nat}: + `%>>_%%`(`REF.EXN_ADDR`_fieldval(a), v_s, $fieldval_val(v_s.EXNS_store[a].FIELDS_exninst[i])) + -- if (i < |v_s.EXNS_store[a].FIELDS_exninst|) + -- if (a < |v_s.EXNS_store|) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),) + + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec:261.1-262.28 + rule ref_extern{v_ref : ref, v_s : store}: + `%>>_%%`(`REF.EXTERN`_fieldval(v_ref), v_s, $fieldval_ref(v_ref)) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(`REF.EXTERN`_fieldval(v_ref),) +} + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +def $fun_NotImmutReachable(v_fieldval : fieldval, v_store : store, v_fieldval_0 : fieldval) : bool + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $fun_NotImmutReachable{fv_1 : fieldval, v_s : store, fv_2 : fieldval}(fv_1, v_s, fv_2) = false + -- ImmutReachable: `%>>_%%`(fv_1, v_s, fv_2) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + def $fun_NotImmutReachable{fv_1 : fieldval, v_s : store, fv_2 : fieldval}(fv_1, v_s, fv_2) = true + -- otherwise + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation NotImmutReachable: `~%>>_%%`(fieldval, store, fieldval) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_NotImmutReachable{fv_1 : fieldval, v_s : store, fv_2 : fieldval}: + `~%>>_%%`(fv_1, v_s, fv_2) + -- wf_fieldval: `%`(fv_1,) + -- wf_store: `%`(v_s,) + -- wf_fieldval: `%`(fv_2,) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Store_ok: `|-%:OK`(store,) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Store_ok{v_s : store, taginst_lst : taginst*, tagtype_lst : tagtype*, globalinst_lst : globalinst*, globaltype_lst : globaltype*, meminst_lst : meminst*, memtype_lst : memtype*, tableinst_lst : tableinst*, tabletype_lst : tabletype*, deftype_lst : deftype*, funcinst_lst : funcinst*, datainst_lst : datainst*, datatype_lst : datatype*, eleminst_lst : eleminst*, elemtype_lst : elemtype*, structinst_lst : structinst*, arrayinst_lst : arrayinst*, exninst_lst : exninst*}: + `|-%:OK`(v_s,) + -- if (|taginst_lst| = |tagtype_lst|) + -- (Taginst_ok: `%|-%:%`(v_s, v_taginst, v_tagtype))*{v_taginst <- taginst_lst, v_tagtype <- tagtype_lst} + -- if (|globalinst_lst| = |globaltype_lst|) + -- (Globalinst_ok: `%|-%:%`(v_s, v_globalinst, v_globaltype))*{v_globalinst <- globalinst_lst, v_globaltype <- globaltype_lst} + -- if (|meminst_lst| = |memtype_lst|) + -- (Meminst_ok: `%|-%:%`(v_s, v_meminst, v_memtype))*{v_meminst <- meminst_lst, v_memtype <- memtype_lst} + -- if (|tableinst_lst| = |tabletype_lst|) + -- (Tableinst_ok: `%|-%:%`(v_s, v_tableinst, v_tabletype))*{v_tableinst <- tableinst_lst, v_tabletype <- tabletype_lst} + -- if (|deftype_lst| = |funcinst_lst|) + -- (Funcinst_ok: `%|-%:%`(v_s, v_funcinst, v_deftype))*{v_deftype <- deftype_lst, v_funcinst <- funcinst_lst} + -- if (|datainst_lst| = |datatype_lst|) + -- (Datainst_ok: `%|-%:%`(v_s, v_datainst, v_datatype))*{v_datainst <- datainst_lst, v_datatype <- datatype_lst} + -- if (|eleminst_lst| = |elemtype_lst|) + -- (Eleminst_ok: `%|-%:%`(v_s, v_eleminst, v_elemtype))*{v_eleminst <- eleminst_lst, v_elemtype <- elemtype_lst} + -- (Structinst_ok: `%|-%:OK`(v_s, v_structinst))*{v_structinst <- structinst_lst} + -- (Arrayinst_ok: `%|-%:OK`(v_s, v_arrayinst))*{v_arrayinst <- arrayinst_lst} + -- (Exninst_ok: `%|-%:OK`(v_s, v_exninst))*{v_exninst <- exninst_lst} + -- (NotImmutReachable: `~%>>_%%`(`REF.STRUCT_ADDR`_fieldval(a), v_s, `REF.STRUCT_ADDR`_fieldval(a)))^(a<|structinst_lst|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.ARRAY_ADDR`_fieldval(a), v_s, `REF.ARRAY_ADDR`_fieldval(a)))^(a<|arrayinst_lst|){} + -- (NotImmutReachable: `~%>>_%%`(`REF.EXN_ADDR`_fieldval(a), v_s, `REF.EXN_ADDR`_fieldval(a)))^(a<|exninst_lst|){} + -- if (v_s = {TAGS taginst_lst, GLOBALS globalinst_lst, MEMS meminst_lst, TABLES tableinst_lst, FUNCS funcinst_lst, DATAS datainst_lst, ELEMS eleminst_lst, STRUCTS structinst_lst, ARRAYS arrayinst_lst, EXNS exninst_lst}) + -- wf_store: `%`(v_s,) + -- (wf_typeuse: `%`(v_tagtype,))*{v_tagtype <- tagtype_lst} + -- (wf_globaltype: `%`(v_globaltype,))*{v_globaltype <- globaltype_lst} + -- (wf_memtype: `%`(v_memtype,))*{v_memtype <- memtype_lst} + -- (wf_tabletype: `%`(v_tabletype,))*{v_tabletype <- tabletype_lst} + -- (wf_reftype: `%`(v_elemtype,))*{v_elemtype <- elemtype_lst} + -- (wf_fieldval: `%`(`REF.STRUCT_ADDR`_fieldval(a),))^(a<|structinst_lst|){} + -- (wf_fieldval: `%`(`REF.ARRAY_ADDR`_fieldval(a),))^(a<|arrayinst_lst|){} + -- (wf_fieldval: `%`(`REF.EXN_ADDR`_fieldval(a),))^(a<|exninst_lst|){} + -- wf_store: `%`({TAGS taginst_lst, GLOBALS globalinst_lst, MEMS meminst_lst, TABLES tableinst_lst, FUNCS funcinst_lst, DATAS datainst_lst, ELEMS eleminst_lst, STRUCTS structinst_lst, ARRAYS arrayinst_lst, EXNS exninst_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_taginst: `%<=%`(taginst, taginst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_taginst{jt : tagtype}: + `%<=%`({TYPE jt}, {TYPE jt}) + -- wf_taginst: `%`({TYPE jt},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_globalinst: `%<=%`(globalinst, globalinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_globalinst{mut_opt : mut?, t : valtype, v_val : val, val' : val}: + `%<=%`({TYPE `%%`_globaltype(mut_opt, t), VALUE v_val}, {TYPE `%%`_globaltype(mut_opt, t), VALUE val'}) + -- if ((mut_opt = ?(MUT_mut)) \/ (v_val = val')) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut_opt, t), VALUE v_val},) + -- wf_globalinst: `%`({TYPE `%%`_globaltype(mut_opt, t), VALUE val'},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_meminst: `%<=%`(meminst, meminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_meminst{at : addrtype, v_n : n, m_opt : m?, b_lst : byte*, n' : n, b'_lst : byte*}: + `%<=%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b_lst}, {TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b'_lst}) + -- if (v_n <= n') + -- if (|b_lst| <= |b'_lst|) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b_lst},) + -- wf_meminst: `%`({TYPE `%%PAGE`_memtype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(v_m,)?{v_m <- m_opt})), BYTES b'_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_tableinst: `%<=%`(tableinst, tableinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_tableinst{at : addrtype, v_n : n, m_opt : m?, rt : reftype, ref_lst : ref*, n' : n, ref'_lst : ref*}: + `%<=%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref_lst}, {TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref'_lst}) + -- if (v_n <= n') + -- if (|ref_lst| <= |ref'_lst|) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(v_n,), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref_lst},) + -- wf_tableinst: `%`({TYPE `%%%`_tabletype(at, `[%..%]`_limits(`%`_u64(n',), `%`_u64(v_m,)?{v_m <- m_opt}), rt), REFS ref'_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_funcinst: `%<=%`(funcinst, funcinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_funcinst{dt : deftype, mm : moduleinst, fc : funccode}: + `%<=%`({TYPE dt, MODULE mm, CODE fc}, {TYPE dt, MODULE mm, CODE fc}) + -- wf_funcinst: `%`({TYPE dt, MODULE mm, CODE fc},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_datainst: `%<=%`(datainst, datainst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_datainst{b_lst : byte*, b'_lst : byte*}: + `%<=%`({BYTES b_lst}, {BYTES b'_lst}) + -- if ((b_lst = b'_lst) \/ (b'_lst = [])) + -- wf_datainst: `%`({BYTES b_lst},) + -- wf_datainst: `%`({BYTES b'_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_eleminst: `%<=%`(eleminst, eleminst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_eleminst{rt : reftype, ref_lst : ref*, ref'_lst : ref*}: + `%<=%`({TYPE rt, REFS ref_lst}, {TYPE rt, REFS ref'_lst}) + -- if ((ref_lst = ref'_lst) \/ (ref'_lst = [])) + -- wf_eleminst: `%`({TYPE rt, REFS ref_lst},) + -- wf_eleminst: `%`({TYPE rt, REFS ref'_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_structinst: `%<=%`(structinst, structinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_structinst{dt : deftype, fv_lst : fieldval*, fv'_lst : fieldval*, mut_opt_lst : mut?*, zt_lst : storagetype*}: + `%<=%`({TYPE dt, FIELDS fv_lst}, {TYPE dt, FIELDS fv'_lst}) + -- Expand: `%~~%`(dt, STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},))) + -- if (|fv_lst| = |fv'_lst|) + -- if (|fv_lst| = |mut_opt_lst|) + -- (if ((mut_opt = ?(MUT_mut)) \/ (fv = fv')))*{fv <- fv_lst, fv' <- fv'_lst, mut_opt <- mut_opt_lst} + -- wf_structinst: `%`({TYPE dt, FIELDS fv_lst},) + -- wf_structinst: `%`({TYPE dt, FIELDS fv'_lst},) + -- wf_comptype: `%`(STRUCT_comptype(`%`_list(`%%`_fieldtype(mut_opt, zt)*{mut_opt <- mut_opt_lst, zt <- zt_lst},)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_arrayinst: `%<=%`(arrayinst, arrayinst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_arrayinst{dt : deftype, fv_lst : fieldval*, fv'_lst : fieldval*, mut_opt : mut?, zt : storagetype}: + `%<=%`({TYPE dt, FIELDS fv_lst}, {TYPE dt, FIELDS fv'_lst}) + -- Expand: `%~~%`(dt, ARRAY_comptype(`%%`_fieldtype(mut_opt, zt))) + -- if (|fv_lst| = |fv'_lst|) + -- (if ((mut_opt = ?(MUT_mut)) \/ (fv = fv')))*{fv <- fv_lst, fv' <- fv'_lst} + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv_lst},) + -- wf_arrayinst: `%`({TYPE dt, FIELDS fv'_lst},) + -- wf_comptype: `%`(ARRAY_comptype(`%%`_fieldtype(mut_opt, zt)),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_exninst: `%<=%`(exninst, exninst) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_exninst{ta : tagaddr, val_lst : val*}: + `%<=%`({TAG ta, FIELDS val_lst}, {TAG ta, FIELDS val_lst}) + -- wf_exninst: `%`({TAG ta, FIELDS val_lst},) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Extend_store: `%<=%`(store, store) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Extend_store{v_s : store, s' : store}: + `%<=%`(v_s, s') + -- (if (a < |v_s.TAGS_store|))^(a<|v_s.TAGS_store|){} + -- (if (a < |s'.TAGS_store|))^(a<|v_s.TAGS_store|){} + -- (Extend_taginst: `%<=%`(v_s.TAGS_store[a], s'.TAGS_store[a]))^(a<|v_s.TAGS_store|){} + -- (if (a < |v_s.GLOBALS_store|))^(a<|v_s.GLOBALS_store|){} + -- (if (a < |s'.GLOBALS_store|))^(a<|v_s.GLOBALS_store|){} + -- (Extend_globalinst: `%<=%`(v_s.GLOBALS_store[a], s'.GLOBALS_store[a]))^(a<|v_s.GLOBALS_store|){} + -- (if (a < |v_s.MEMS_store|))^(a<|v_s.MEMS_store|){} + -- (if (a < |s'.MEMS_store|))^(a<|v_s.MEMS_store|){} + -- (Extend_meminst: `%<=%`(v_s.MEMS_store[a], s'.MEMS_store[a]))^(a<|v_s.MEMS_store|){} + -- (if (a < |v_s.TABLES_store|))^(a<|v_s.TABLES_store|){} + -- (if (a < |s'.TABLES_store|))^(a<|v_s.TABLES_store|){} + -- (Extend_tableinst: `%<=%`(v_s.TABLES_store[a], s'.TABLES_store[a]))^(a<|v_s.TABLES_store|){} + -- (if (a < |v_s.FUNCS_store|))^(a<|v_s.FUNCS_store|){} + -- (if (a < |s'.FUNCS_store|))^(a<|v_s.FUNCS_store|){} + -- (Extend_funcinst: `%<=%`(v_s.FUNCS_store[a], s'.FUNCS_store[a]))^(a<|v_s.FUNCS_store|){} + -- (if (a < |v_s.DATAS_store|))^(a<|v_s.DATAS_store|){} + -- (if (a < |s'.DATAS_store|))^(a<|v_s.DATAS_store|){} + -- (Extend_datainst: `%<=%`(v_s.DATAS_store[a], s'.DATAS_store[a]))^(a<|v_s.DATAS_store|){} + -- (if (a < |v_s.ELEMS_store|))^(a<|v_s.ELEMS_store|){} + -- (if (a < |s'.ELEMS_store|))^(a<|v_s.ELEMS_store|){} + -- (Extend_eleminst: `%<=%`(v_s.ELEMS_store[a], s'.ELEMS_store[a]))^(a<|v_s.ELEMS_store|){} + -- (if (a < |v_s.STRUCTS_store|))^(a<|v_s.STRUCTS_store|){} + -- (if (a < |s'.STRUCTS_store|))^(a<|v_s.STRUCTS_store|){} + -- (Extend_structinst: `%<=%`(v_s.STRUCTS_store[a], s'.STRUCTS_store[a]))^(a<|v_s.STRUCTS_store|){} + -- (if (a < |v_s.ARRAYS_store|))^(a<|v_s.ARRAYS_store|){} + -- (if (a < |s'.ARRAYS_store|))^(a<|v_s.ARRAYS_store|){} + -- (Extend_arrayinst: `%<=%`(v_s.ARRAYS_store[a], s'.ARRAYS_store[a]))^(a<|v_s.ARRAYS_store|){} + -- (if (a < |v_s.EXNS_store|))^(a<|v_s.EXNS_store|){} + -- (if (a < |s'.EXNS_store|))^(a<|v_s.EXNS_store|){} + -- (Extend_exninst: `%<=%`(v_s.EXNS_store[a], s'.EXNS_store[a]))^(a<|v_s.EXNS_store|){} + -- wf_store: `%`(v_s,) + -- wf_store: `%`(s',) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation State_ok: `|-%:%`(state, context) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_State_ok{v_s : store, v_f : frame, C : context}: + `|-%:%`(`%;%`_state(v_s, v_f), C) + -- Store_ok: `|-%:OK`(v_s,) + -- Frame_ok: `%|-%:%`(v_s, v_f, C) + -- wf_context: `%`(C,) + -- wf_state: `%`(`%;%`_state(v_s, v_f),) + +;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec +relation Config_ok: `|-%:%`(config, resulttype) + ;; ../../../../specification/wasm-3.0/7.1-soundness.configurations.spectec + rule mk_Config_ok{v_s : store, v_f : frame, instr_lst : instr*, t_lst : valtype*, C : context}: + `|-%:%`(`%;%`_config(`%;%`_state(v_s, v_f), instr_lst), `%`_resulttype(t_lst,)) + -- State_ok: `|-%:%`(`%;%`_state(v_s, v_f), C) + -- Expr_ok2: `%;%|-%:%`(v_s, C, instr_lst, `%`_resulttype(t_lst,)) + -- (wf_valtype: `%`(t,))*{t <- t_lst} + -- wf_context: `%`(C,) + -- wf_config: `%`(`%;%`_config(`%;%`_state(v_s, v_f), instr_lst),) + -- wf_state: `%`(`%;%`_state(v_s, v_f),) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax A = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax B = nat + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax sym = + | _FIRST(A) + | _DOTS + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax symsplit = + | _FIRST(A) + | _LAST(A) + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax recorddots = () + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax record = +{ + FIELD_1 A, + FIELD_2 A, + mk_record recorddots +} + +;; ../../../../specification/wasm-3.0/X.1-notation.syntax.spectec +syntax pth = + | PTHSYNTAX + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +syntax T = nat + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremise: `%`(nat,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingPremisedots: `...` + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +relation NotationTypingScheme: `%`(nat,) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec + rule mk_NotationTypingScheme{conclusion : nat, premise_1 : nat, premise_2 : nat, premise_n : nat}: + `%`(conclusion,) + -- NotationTypingPremise: `%`(premise_1,) + -- NotationTypingPremise: `%`(premise_2,) + -- NotationTypingPremisedots: `...` + -- NotationTypingPremise: `%`(premise_n,) + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:20.1-20.83 +relation NotationTypingInstrScheme: `%|-%:%`(context, instr*, instrtype) + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:22.1-23.38 + rule i32_add{C : context}: + `%|-%:%`(C, [BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn))], `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([I32_valtype],)),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:25.1-27.29 + rule global_get{C : context, x : idx, t : valtype, v_mut : mut}: + `%|-%:%`(C, [`GLOBAL.GET`_instr(x)], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) + -- if ($proj_uN_0(x).0 < |C.GLOBALS_context|) + -- if (C.GLOBALS_context[$proj_uN_0(x).0] = `%%`_globaltype(?(v_mut), t)) + -- wf_context: `%`(C,) + -- wf_instr: `%`(`GLOBAL.GET`_instr(x),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],)),) + -- wf_globaltype: `%`(`%%`_globaltype(?(v_mut), t),) + + ;; ../../../../specification/wasm-3.0/X.2-notation.typing.spectec:29.1-32.78 + rule block{C : context, v_blocktype : blocktype, instr_lst : instr*, t_1_lst : valtype*, t_2_lst : valtype*}: + `%|-%:%`(C, [BLOCK_instr(v_blocktype, instr_lst)], `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- Blocktype_ok: `%|-%:%`(C, v_blocktype, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- NotationTypingInstrScheme: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []} +++ C, instr_lst, `%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,))) + -- wf_context: `%`(C,) + -- wf_instr: `%`(BLOCK_instr(v_blocktype, instr_lst),) + -- wf_instrtype: `%`(`%->_%%`_instrtype(`%`_resulttype(t_1_lst,), [], `%`_resulttype(t_2_lst,)),) + -- wf_context: `%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2_lst,)], RETURN ?(), REFS [], RECS []},) +} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation NotationReduct: `~>%`(instr*,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule r_2{q_1 : num_, q_4 : num_, q_3 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_4) CONST_instr(F64_numtype, q_3) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_4),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_3),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule r_3{q_1 : num_, q_5 : num_}: + `~>%`([CONST_instr(F64_numtype, q_1) CONST_instr(F64_numtype, q_5) BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn))],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_1),) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_5),) + -- wf_instr: `%`(BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)),) + + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule r_4{q_6 : num_}: + `~>%`([CONST_instr(F64_numtype, q_6)],) + -- wf_instr: `%`(CONST_instr(F64_numtype, q_6),) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $instrdots : instr* + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax label = + | `LABEL_%{%}`(v_n : n, instr_lst : instr*) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_label: `%`(label,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule label_case_0{v_n : n, instr_lst : instr*}: + `%`(`LABEL_%{%}`_label(v_n, instr_lst),) + -- (wf_instr: `%`(v_instr,))*{v_instr <- instr_lst} + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +syntax callframe = + | `FRAME_%{%}`(v_n : n, v_frame : frame) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +relation wf_callframe: `%`(callframe,) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec + rule callframe_case_0{v_n : n, v_frame : frame}: + `%`(`FRAME_%{%}`_callframe(v_n, v_frame),) + -- wf_frame: `%`(v_frame,) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +def $allocX(syntax X, syntax Y, v_store : store, X_0 : X, Y_0 : Y) : (store, addr) + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec +rec { + +;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:32.1-32.117 +def $allocXs(syntax X, syntax Y, v_store : store, var_0 : X*, var_1 : Y*) : (store, addr*) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:33.1-33.57 + def $allocXs{syntax X, syntax Y, v_s : store}(syntax X, syntax Y, v_s, [], []) = (v_s, []) + ;; ../../../../specification/wasm-3.0/X.3-notation.execution.spectec:34.1-36.65 + def $allocXs{syntax X, syntax Y, v_s : store, X : X, X'_lst : X*, Y : Y, Y'_lst : Y*}(syntax X, syntax Y, v_s, [X] ++ X'_lst, [Y] ++ Y'_lst) = (s_2, [a] ++ a'_lst) + -- let{a : addr, s_1 : store} (s_1, a) = $allocX(syntax X, syntax Y, v_s, X, Y) + -- let{s_2 : store, a'_lst : addr*} (s_2, a'_lst) = $allocXs(syntax X, syntax Y, s_1, X'_lst, Y'_lst) +} + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +syntax symdots = + | `%`(i : nat,) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +relation wf_symdots: `%`(symdots,) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + rule symdots_case_0{i : nat}: + `%`(`%`_symdots(i,),) + -- if (i = 0) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +def $var(syntax X) : nat + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + def $var{syntax X}(syntax X) = 0 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax abbreviated = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax expanded = () + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +syntax syntax = () + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bbyte : byte + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : nat} ``:(0x00 | ... | 0xFF) => `%`_byte(``,) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:9.1-11.82 +grammar BuN(v_N : N) : uN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:10.5-10.83 + prod{v_n : n} `%`_byte(v_n,):Bbyte => `%`_uN(v_n,) + -- if ((v_n < (2 ^ 7)) /\ (v_n < (2 ^ v_N))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:11.5-11.82 + prod{v_m : m, v_n : n} {{`%`_byte(v_n,):Bbyte} {`%`_uN(v_m,):BuN((((v_N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_uN((((2 ^ 7) * v_m) + (((v_n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)),) + -- if ((v_n >= (2 ^ 7)) /\ (v_N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:13.1-16.82 +grammar BsN(v_N : N) : sN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:14.5-14.87 + prod{v_n : n} `%`_byte(v_n,):Bbyte => `%`_sN((v_n : nat <:> int),) + -- if ((v_n < (2 ^ 6)) /\ (v_n < (2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:15.5-15.101 + prod{v_n : n} `%`_byte(v_n,):Bbyte => `%`_sN(((v_n : nat <:> int) - ((2 ^ 7) : nat <:> int)),) + -- if ((((2 ^ 6) <= v_n) /\ (v_n < (2 ^ 7))) /\ ((v_n : nat <:> int) >= (((2 ^ 7) : nat <:> int) - ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int)))) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec:16.5-16.82 + prod{i : sN, v_n : n} {{`%`_byte(v_n,):Bbyte} {i:BsN((((v_N : nat <:> int) - (7 : nat <:> int)) : int <:> nat))}} => `%`_sN(((((2 ^ 7) * ($proj_sN_0(i).0 : int <:> nat)) + (((v_n : nat <:> int) - ((2 ^ 7) : nat <:> int)) : int <:> nat)) : nat <:> int),) + -- if ((v_n >= (2 ^ 7)) /\ (v_N > 7)) +} + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BiN(v_N : N) : iN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{i : sN} i:BsN(v_N) => `%`_iN($inv_signed_(v_N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar BfN(v_N : N) : fN + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{b_lst : byte*} b_lst:Bbyte^(((v_N : nat <:> rat) / (8 : nat <:> rat)) : rat <:> nat){} => $inv_fbytes_(v_N, b_lst) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu32 : u32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bu64 : u64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : uN} ``:BuN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bs33 : s33 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : sN} ``:BsN(33) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi32 : i32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bi64 : i64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : iN} ``:BiN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf32 : f32 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(32) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bf64 : f64 + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{`` : fN} ``:BfN(64) => `` + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blist(syntax el, grammar BX : el) : el* + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{v_n : n, el_lst : el*} {{`%`_u32(v_n,):Bu32} {el:BX^v_n{el <- el_lst}}} => el_lst + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bname : name + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{v_name : name, b_lst : byte*} b_lst:Blist(syntax byte, grammar Bbyte) => v_name + -- if ($utf8($proj_name_0(v_name).0) = b_lst) + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btypeidx : typeidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btagidx : tagidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bglobalidx : globalidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bmemidx : memidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Btableidx : tableidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfuncidx : funcidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bdataidx : dataidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Belemidx : elemidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blocalidx : localidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bfieldidx : fieldidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} x:Bu32 => x + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Blabelidx : labelidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{l : labelidx} l:Bu32 => l + +;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec +grammar Bexternidx : externidx + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x00} {x:Bfuncidx}} => FUNC_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x01} {x:Btableidx}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x02} {x:Bmemidx}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x03} {x:Bglobalidx}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/5.1-binary.values.spectec + prod{x : idx} {{0x04} {x:Btagidx}} => TAG_externidx(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bnumtype : numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7C => F64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7D => F32_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7E => I64_numtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7F => I32_numtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvectype : vectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x7B => V128_vectype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Babsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x69 => EXN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6A => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6B => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6C => I31_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6D => EQ_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6E => ANY_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x6F => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x70 => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x71 => NONE_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x72 => NOEXTERN_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x73 => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x74 => NOEXN_heaptype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bheaptype : heaptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => ht + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + -- if ($proj_sN_0(x33).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Breftype : reftype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x63} {ht:Bheaptype}} => REF_reftype(?(NULL_null), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} {{0x64} {ht:Bheaptype}} => REF_reftype(?(), ht) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ht : heaptype} ht:Babsheaptype => REF_reftype(?(NULL_null), ht) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bvaltype : valtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{nt : numtype} nt:Bnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{vt : vectype} vt:Bvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{rt : reftype} rt:Breftype => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bresulttype : resulttype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t_lst : valtype*} t_lst:Blist(syntax valtype, grammar Bvaltype) => `%`_resulttype(t_lst,) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmut : mut? + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x00 => ?() + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x01 => ?(MUT_mut) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bpacktype : packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x77 => I16_packtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod 0x78 => I8_packtype + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bstoragetype : storagetype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t : valtype} t:Bvaltype => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{pt : packtype} pt:Bpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bfieldtype : fieldtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mut_opt : mut?, zt : storagetype} {{zt:Bstoragetype} {mut_opt:Bmut}} => `%%`_fieldtype(mut_opt, zt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bcomptype : comptype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft : fieldtype} {{0x5E} {ft:Bfieldtype}} => ARRAY_comptype(ft) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ft_lst : fieldtype*} {{0x5F} {ft_lst:Blist(syntax fieldtype, grammar Bfieldtype)}} => STRUCT_comptype(`%`_list(ft_lst,)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{t_1_lst : valtype*, t_2_lst : valtype*} {{0x60} {`%`_resulttype(t_1_lst,):Bresulttype} {`%`_resulttype(t_2_lst,):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bsubtype : subtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x_lst : idx*, ct : comptype} {{0x4F} {x_lst:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- x_lst}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x_lst : idx*, ct : comptype} {{0x50} {x_lst:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- x_lst}, ct) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], ct) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Brectype : rectype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st_lst : subtype*} {{0x4E} {st_lst:Blist(syntax subtype, grammar Bsubtype)}} => REC_rectype(`%`_list(st_lst,)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{st : subtype} st:Bsubtype => REC_rectype(`%`_list([st],)) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Blimits : (addrtype, limits) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{v_n : n} {{0x00} {`%`_u64(v_n,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(v_n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{v_n : n, v_m : m} {{0x01} {`%`_u64(v_n,):Bu64} {`%`_u64(v_m,):Bu64}} => (I32_addrtype, `[%..%]`_limits(`%`_u64(v_n,), ?(`%`_u64(v_m,)))) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{v_n : n} {{0x04} {`%`_u64(v_n,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(v_n,), ?())) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{v_n : n, v_m : m} {{0x05} {`%`_u64(v_n,):Bu64} {`%`_u64(v_m,):Bu64}} => (I64_addrtype, `[%..%]`_limits(`%`_u64(v_n,), ?(`%`_u64(v_m,)))) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btagtype : tagtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bglobaltype : globaltype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mut_opt : mut?, t : valtype} {{t:Bvaltype} {mut_opt:Bmut}} => `%%`_globaltype(mut_opt, t) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bmemtype : memtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits} (at, lim):Blimits => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Btabletype : tabletype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{rt:Breftype} {(at, lim):Blimits}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec +grammar Bexterntype : externtype + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{mt : memtype} {{0x02} {mt:Bmemtype}} => MEM_externtype(mt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{gt : globaltype} {{0x03} {gt:Bglobaltype}} => GLOBAL_externtype(gt) + ;; ../../../../specification/wasm-3.0/5.2-binary.types.spectec + prod{jt : tagtype} {{0x04} {jt:Btagtype}} => TAG_externtype(jt) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcastop : castop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x00 => (?(), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x01 => (?(NULL_null), ?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x02 => (?(), ?(NULL_null)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x03 => (?(NULL_null), ?(NULL_null)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bblocktype : blocktype + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod 0x40 => _RESULT_blocktype(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{t : valtype} t:Bvaltype => _RESULT_blocktype(?(t)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{i : s33} i:Bs33 => _IDX_blocktype(`%`_typeidx(($proj_sN_0(i).0 : int <:> nat),)) + -- if ($proj_sN_0(i).0 >= (0 : nat <:> int)) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bcatch : catch + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x00} {x:Btagidx} {l:Blabelidx}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, l : labelidx} {{0x01} {x:Btagidx} {l:Blabelidx}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x02} {l:Blabelidx}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} {{0x03} {l:Blabelidx}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bmemarg : memidxop + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{v_n : n, v_m : m} {{`%`_u32(v_n,):Bu32} {`%`_u64(v_m,):Bu64}} => (`%`_memidx(0,), {ALIGN `%`_u32(v_n,), OFFSET `%`_u64(v_m,)}) + -- if (v_n < (2 ^ 6)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{x : idx, v_n : n, v_m : m} {{`%`_u32(v_n,):Bu32} {x:Bmemidx} {`%`_u64(v_m,):Bu64}} => (x, {ALIGN `%`_u32((((v_n : nat <:> int) - ((2 ^ 6) : nat <:> int)) : int <:> nat),), OFFSET `%`_u64(v_m,)}) + -- if (((2 ^ 6) <= v_n) /\ (v_n < (2 ^ 7))) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Blaneidx : laneidx + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{l : labelidx} `%`_byte($proj_uN_0(l).0,):Bbyte => `%`_laneidx($proj_uN_0(l).0,) + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:793.1-807.71 +grammar Binstr : instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:8.5-8.24 + prod 0x00 => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:9.5-9.16 + prod 0x01 => NOP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:10.5-10.17 + prod 0x1A => DROP_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:11.5-11.19 + prod 0x1B => SELECT_instr(?()) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:12.5-12.41 + prod{t_lst : valtype*} {{0x1C} {t_lst:Blist(syntax valtype, grammar Bvaltype)}} => SELECT_instr(?(t_lst)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:32.5-32.57 + prod{bt : blocktype, in_lst : instr*} {{0x02} {bt:Bblocktype} {in:Binstr*{in <- in_lst}} {0x0B}} => BLOCK_instr(bt, in_lst) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:33.5-33.56 + prod{bt : blocktype, in_lst : instr*} {{0x03} {bt:Bblocktype} {in:Binstr*{in <- in_lst}} {0x0B}} => LOOP_instr(bt, in_lst) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:34.5-34.63 + prod{bt : blocktype, in_lst : instr*} {{0x04} {bt:Bblocktype} {in:Binstr*{in <- in_lst}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_lst, []) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:35.5-36.55 + prod{bt : blocktype, in_1_lst : instr*, in_2_lst : instr*} {{0x04} {bt:Bblocktype} {in_1:Binstr*{in_1 <- in_1_lst}} {0x05} {in_2:Binstr*{in_2 <- in_2_lst}} {0x0B}} => `IF%%ELSE%`_instr(bt, in_1_lst, in_2_lst) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:40.5-40.30 + prod{x : idx} {{0x08} {x:Btagidx}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:41.5-41.22 + prod 0x0A => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:42.5-42.29 + prod{l : labelidx} {{0x0C} {l:Blabelidx}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:43.5-43.32 + prod{l : labelidx} {{0x0D} {l:Blabelidx}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:44.5-44.62 + prod{l_lst : labelidx*, l_n : labelidx} {{0x0E} {l_lst:Blist(syntax labelidx, grammar Blabelidx)} {l_n:Blabelidx}} => BR_TABLE_instr(l_lst, l_n) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:45.5-45.19 + prod 0x0F => RETURN_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:46.5-46.30 + prod{x : idx} {{0x10} {x:Bfuncidx}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:47.5-47.60 + prod{x : idx, y : idx} {{0x11} {y:Btypeidx} {x:Btableidx}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:48.5-48.37 + prod{x : idx} {{0x12} {x:Bfuncidx}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:49.5-49.67 + prod{x : idx, y : idx} {{0x13} {y:Btypeidx} {x:Btableidx}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:50.5-50.41 + prod{x : idx} {{0x14} {x:Btypeidx}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:51.5-51.48 + prod{x : idx} {{0x15} {x:Btypeidx}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:52.5-52.81 + prod{bt : blocktype, c_lst : catch*, in_lst : instr*} {{0x1F} {bt:Bblocktype} {c_lst:Blist(syntax catch, grammar Bcatch)} {in:Binstr*{in <- in_lst}} {0x0B}} => TRY_TABLE_instr(bt, `%`_list(c_lst,), in_lst) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:53.5-53.37 + prod{l : labelidx} {{0xD5} {l:Blabelidx}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:54.5-54.41 + prod{l : labelidx} {{0xD6} {l:Blabelidx}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:55.5-56.100 + prod{l : labelidx, null_1_opt : null?, ht_1 : heaptype, null_2_opt : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1_opt, null_2_opt):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1_opt, ht_1), REF_reftype(null_2_opt, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:57.5-58.105 + prod{l : labelidx, null_1_opt : null?, ht_1 : heaptype, null_2_opt : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1_opt, null_2_opt):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1_opt, ht_1), REF_reftype(null_2_opt, ht_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:71.5-71.36 + prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:72.5-72.36 + prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:73.5-73.36 + prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:77.5-77.38 + prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:78.5-78.38 + prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:85.5-85.36 + prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:86.5-86.36 + prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:87.5-87.58 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:88.5-88.43 + prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:89.5-89.67 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:90.5-90.45 + prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:91.5-91.45 + prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:92.5-92.45 + prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:105.5-105.41 + prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:106.5-106.41 + prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:107.5-107.41 + prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:108.5-108.41 + prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:109.5-109.50 + prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:110.5-110.50 + prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:111.5-111.51 + prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:112.5-112.51 + prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:113.5-113.50 + prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:114.5-114.50 + prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:115.5-115.51 + prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:116.5-116.51 + prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:117.5-117.51 + prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:118.5-118.51 + prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:119.5-119.42 + prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:120.5-120.42 + prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:121.5-121.42 + prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:122.5-122.42 + prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:123.5-123.45 + prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:124.5-124.46 + prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:125.5-125.45 + prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:126.5-126.46 + prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:127.5-127.46 + prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:128.5-128.36 + prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:129.5-129.36 + prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:130.5-130.56 + prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:131.5-131.42 + prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:132.5-132.64 + prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:133.5-133.44 + prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:140.5-140.37 + prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:141.5-141.24 + prod 0xD1 => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:142.5-142.34 + prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:143.5-143.19 + prod 0xD3 => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:144.5-144.28 + prod 0xD4 => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:145.5-145.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:146.5-146.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:147.5-147.51 + prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:148.5-148.56 + prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:152.5-152.43 + prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:153.5-153.51 + prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:154.5-154.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:155.5-155.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:156.5-156.59 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:157.5-157.57 + prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:161.5-161.42 + prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:162.5-162.50 + prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:163.5-163.57 + prod{x : idx, v_n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(v_n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:164.5-164.60 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:165.5-165.61 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:166.5-166.43 + prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:167.5-167.45 + prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:168.5-168.45 + prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:169.5-169.43 + prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:170.5-170.30 + prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:171.5-171.44 + prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:172.5-172.65 + prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:173.5-173.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:174.5-174.62 + prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:178.5-178.39 + prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:179.5-179.39 + prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:183.5-183.28 + prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:184.5-184.30 + prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:185.5-185.30 + prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:192.5-192.31 + prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:193.5-193.31 + prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, i)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:194.5-194.31 + prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:195.5-195.31 + prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, p)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:199.5-199.27 + prod 0x45 => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:203.5-203.25 + prod 0x46 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:204.5-204.25 + prod 0x47 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:205.5-205.27 + prod 0x48 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:206.5-206.27 + prod 0x49 => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:207.5-207.27 + prod 0x4A => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:208.5-208.27 + prod 0x4B => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:209.5-209.27 + prod 0x4C => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:210.5-210.27 + prod 0x4D => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:211.5-211.27 + prod 0x4E => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:212.5-212.27 + prod 0x4F => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:216.5-216.27 + prod 0x50 => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:220.5-220.25 + prod 0x51 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:221.5-221.25 + prod 0x52 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:222.5-222.27 + prod 0x53 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:223.5-223.27 + prod 0x54 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:224.5-224.27 + prod 0x55 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:225.5-225.27 + prod 0x56 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:226.5-226.27 + prod 0x57 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:227.5-227.27 + prod 0x58 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:228.5-228.27 + prod 0x59 => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:229.5-229.27 + prod 0x5A => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:233.5-233.25 + prod 0x5B => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:234.5-234.25 + prod 0x5C => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:235.5-235.25 + prod 0x5D => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:236.5-236.25 + prod 0x5E => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:237.5-237.25 + prod 0x5F => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:238.5-238.25 + prod 0x60 => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:242.5-242.25 + prod 0x61 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:243.5-243.25 + prod 0x62 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:244.5-244.25 + prod 0x63 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:245.5-245.25 + prod 0x64 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:246.5-246.25 + prod 0x65 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:247.5-247.25 + prod 0x66 => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:251.5-251.25 + prod 0x67 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:252.5-252.25 + prod 0x68 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:253.5-253.28 + prod 0x69 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:257.5-257.26 + prod 0x6A => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:258.5-258.26 + prod 0x6B => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:259.5-259.26 + prod 0x6C => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:260.5-260.28 + prod 0x6D => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:261.5-261.28 + prod 0x6E => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:262.5-262.28 + prod 0x6F => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:263.5-263.28 + prod 0x70 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:264.5-264.26 + prod 0x71 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:265.5-265.25 + prod 0x72 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:266.5-266.26 + prod 0x73 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:267.5-267.26 + prod 0x74 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:268.5-268.28 + prod 0x75 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:269.5-269.28 + prod 0x76 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:270.5-270.27 + prod 0x77 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:271.5-271.27 + prod 0x78 => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:275.5-275.25 + prod 0x79 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:276.5-276.25 + prod 0x7A => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:277.5-277.28 + prod 0x7B => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:281.5-281.31 + prod 0xC0 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:282.5-282.32 + prod 0xC1 => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:286.5-286.31 + prod 0xC2 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:287.5-287.32 + prod 0xC3 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:288.5-288.32 + prod 0xC4 => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:292.5-292.26 + prod 0x7C => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:293.5-293.26 + prod 0x7D => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:294.5-294.26 + prod 0x7E => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:295.5-295.28 + prod 0x7F => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:296.5-296.28 + prod 0x80 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:297.5-297.28 + prod 0x81 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:298.5-298.28 + prod 0x82 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:299.5-299.26 + prod 0x83 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:300.5-300.25 + prod 0x84 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:301.5-301.26 + prod 0x85 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:302.5-302.26 + prod 0x86 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:303.5-303.28 + prod 0x87 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:304.5-304.28 + prod 0x88 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:305.5-305.27 + prod 0x89 => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:306.5-306.27 + prod 0x8A => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:310.5-310.25 + prod 0x8B => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:311.5-311.25 + prod 0x8C => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:312.5-312.26 + prod 0x8D => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:313.5-313.27 + prod 0x8E => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:314.5-314.27 + prod 0x8F => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:315.5-315.29 + prod 0x90 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:316.5-316.26 + prod 0x91 => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:320.5-320.26 + prod 0x92 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:321.5-321.26 + prod 0x93 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:322.5-322.26 + prod 0x94 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:323.5-323.26 + prod 0x95 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:324.5-324.26 + prod 0x96 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:325.5-325.26 + prod 0x97 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:326.5-326.31 + prod 0x98 => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:330.5-330.25 + prod 0x99 => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:331.5-331.25 + prod 0x9A => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:332.5-332.26 + prod 0x9B => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:333.5-333.27 + prod 0x9C => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:334.5-334.27 + prod 0x9D => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:335.5-335.29 + prod 0x9E => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:336.5-336.26 + prod 0x9F => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:340.5-340.26 + prod 0xA0 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:341.5-341.26 + prod 0xA1 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:342.5-342.26 + prod 0xA2 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:343.5-343.26 + prod 0xA3 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:344.5-344.26 + prod 0xA4 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:345.5-345.26 + prod 0xA5 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:346.5-346.31 + prod 0xA6 => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:351.5-351.31 + prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:352.5-352.34 + prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:353.5-353.34 + prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:354.5-354.34 + prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:355.5-355.34 + prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:356.5-356.35 + prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:357.5-357.35 + prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:358.5-358.34 + prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:359.5-359.34 + prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:360.5-360.34 + prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:361.5-361.34 + prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:362.5-362.36 + prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:363.5-363.36 + prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:364.5-364.36 + prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:365.5-365.36 + prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:366.5-366.33 + prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:367.5-367.36 + prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:368.5-368.36 + prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:369.5-369.36 + prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:370.5-370.36 + prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:371.5-371.34 + prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:372.5-372.38 + prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:373.5-373.38 + prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:374.5-374.38 + prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:375.5-375.38 + prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:379.5-379.45 + prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:380.5-380.45 + prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:381.5-381.45 + prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:382.5-382.45 + prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:383.5-383.45 + prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:384.5-384.45 + prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:385.5-385.45 + prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:386.5-386.45 + prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:396.5-396.50 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:397.5-397.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:398.5-398.70 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:399.5-399.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:400.5-400.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:401.5-401.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:402.5-402.71 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:403.5-403.61 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:404.5-404.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:405.5-405.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:406.5-406.63 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:407.5-407.52 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:408.5-408.72 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:409.5-409.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:410.5-410.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:411.5-411.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:412.5-412.73 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:413.5-413.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:414.5-414.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:415.5-415.74 + prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:416.5-416.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:417.5-417.62 + prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:421.5-421.72 + prod{b_lst : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- b_lst}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b_lst)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:425.5-425.61 + prod{l_lst : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx^16{l <- l_lst}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx($proj_uN_0(l).0,)^16{l <- l_lst}) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:426.5-426.49 + prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:427.5-427.58 + prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:431.5-431.38 + prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:432.5-432.38 + prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:433.5-433.38 + prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:434.5-434.38 + prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:435.5-435.38 + prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:436.5-436.38 + prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:440.5-440.60 + prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:441.5-441.60 + prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:442.5-442.58 + prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:443.5-443.60 + prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:444.5-444.60 + prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:445.5-445.58 + prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:446.5-446.58 + prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:447.5-447.58 + prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:448.5-448.58 + prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:449.5-449.58 + prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:450.5-450.58 + prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:451.5-451.58 + prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:452.5-452.58 + prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:453.5-453.58 + prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx($proj_uN_0(l).0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx($proj_uN_0(l).0,)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:457.5-457.41 + prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:458.5-458.41 + prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:459.5-459.43 + prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:460.5-460.43 + prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:461.5-461.43 + prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:462.5-462.43 + prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:463.5-463.43 + prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:464.5-464.43 + prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:465.5-465.43 + prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:466.5-466.43 + prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:470.5-470.41 + prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:471.5-471.41 + prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:472.5-472.43 + prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:473.5-473.43 + prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:474.5-474.43 + prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:475.5-475.43 + prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:476.5-476.43 + prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:477.5-477.43 + prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:478.5-478.43 + prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:479.5-479.43 + prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:483.5-483.41 + prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:484.5-484.41 + prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:485.5-485.43 + prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:486.5-486.43 + prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:487.5-487.43 + prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:488.5-488.43 + prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:489.5-489.43 + prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:490.5-490.43 + prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:491.5-491.43 + prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:492.5-492.43 + prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:496.5-496.41 + prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:497.5-497.41 + prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:498.5-498.41 + prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:499.5-499.41 + prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:500.5-500.41 + prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:501.5-501.41 + prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:505.5-505.41 + prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:506.5-506.41 + prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:507.5-507.41 + prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:508.5-508.41 + prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:509.5-509.41 + prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:510.5-510.41 + prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:514.5-514.36 + prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:518.5-518.37 + prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:519.5-519.40 + prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:520.5-520.36 + prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:521.5-521.37 + prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:525.5-525.44 + prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:529.5-529.43 + prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:533.5-533.41 + prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:534.5-534.41 + prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:535.5-535.44 + prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:539.5-539.48 + prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:543.5-543.41 + prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:547.5-547.53 + prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:548.5-548.53 + prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:552.5-552.45 + prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:553.5-553.47 + prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:554.5-554.47 + prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:558.5-558.43 + prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:559.5-559.49 + prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:560.5-560.49 + prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:561.5-561.43 + prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:562.5-562.49 + prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:563.5-563.49 + prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:564.5-564.45 + prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:565.5-565.45 + prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:566.5-566.45 + prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:567.5-567.45 + prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:568.5-568.46 + prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:572.5-572.70 + prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:573.5-573.70 + prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:577.5-577.42 + prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:578.5-578.42 + prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:582.5-582.53 + prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:583.5-583.43 + prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:584.5-584.49 + prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:585.5-585.49 + prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:586.5-586.43 + prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:587.5-587.49 + prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:588.5-588.49 + prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:589.5-589.43 + prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:590.5-590.45 + prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:591.5-591.45 + prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:592.5-592.45 + prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:593.5-593.45 + prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:594.5-594.46 + prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:595.5-595.57 + prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:599.5-599.49 + prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:603.5-603.41 + prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:607.5-607.53 + prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:608.5-608.53 + prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:612.5-612.63 + prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:613.5-613.64 + prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:614.5-614.63 + prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:615.5-615.64 + prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:619.5-619.45 + prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:620.5-620.47 + prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:621.5-621.47 + prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:625.5-625.66 + prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:626.5-626.67 + prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:627.5-627.66 + prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:628.5-628.67 + prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:629.5-629.67 + prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:633.5-633.70 + prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:634.5-634.70 + prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:638.5-638.42 + prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:639.5-639.42 + prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:643.5-643.49 + prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:647.5-647.41 + prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:651.5-651.63 + prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:652.5-652.64 + prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:653.5-653.63 + prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:654.5-654.64 + prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:658.5-658.45 + prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:659.5-659.49 + prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:660.5-660.49 + prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:664.5-664.43 + prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:665.5-665.43 + prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:666.5-666.43 + prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:667.5-667.45 + prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:668.5-668.45 + prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:669.5-669.45 + prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:670.5-670.45 + prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:674.5-674.59 + prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:675.5-675.66 + prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:676.5-676.67 + prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:677.5-677.66 + prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:678.5-678.67 + prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:682.5-682.72 + prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:686.5-686.42 + prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:687.5-687.42 + prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:691.5-691.49 + prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:695.5-695.41 + prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:699.5-699.63 + prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:700.5-700.64 + prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:701.5-701.63 + prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:702.5-702.64 + prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:706.5-706.45 + prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:707.5-707.49 + prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:708.5-708.49 + prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:712.5-712.43 + prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:713.5-713.43 + prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:714.5-714.43 + prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:718.5-718.42 + prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:719.5-719.42 + prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:720.5-720.46 + prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:721.5-721.46 + prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:722.5-722.46 + prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:723.5-723.46 + prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:727.5-727.66 + prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:728.5-728.67 + prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:729.5-729.66 + prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:730.5-730.67 + prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:734.5-734.43 + prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:735.5-735.44 + prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:736.5-736.44 + prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:737.5-737.46 + prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:738.5-738.42 + prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:739.5-739.42 + prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:740.5-740.43 + prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:744.5-744.43 + prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:745.5-745.43 + prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:746.5-746.43 + prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:747.5-747.43 + prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:748.5-748.43 + prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:749.5-749.43 + prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:750.5-750.44 + prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:751.5-751.44 + prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:752.5-752.51 + prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:753.5-753.51 + prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:757.5-757.53 + prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:758.5-758.54 + prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:762.5-762.43 + prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:763.5-763.44 + prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:764.5-764.44 + prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:765.5-765.46 + prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:766.5-766.42 + prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:767.5-767.42 + prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:768.5-768.43 + prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:772.5-772.43 + prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:773.5-773.43 + prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:774.5-774.43 + prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:775.5-775.43 + prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:776.5-776.43 + prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:777.5-777.43 + prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:778.5-778.44 + prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:779.5-779.44 + prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:780.5-780.51 + prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:781.5-781.51 + prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:785.5-785.53 + prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:786.5-786.54 + prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:787.5-787.59 + prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:788.5-788.59 + prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:789.5-789.59 + prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:790.5-790.59 + prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:794.5-794.61 + prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:795.5-795.61 + prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:796.5-796.62 + prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:797.5-797.62 + prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:798.5-798.60 + prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:799.5-799.60 + prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:800.5-800.67 + prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:801.5-801.67 + prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:802.5-802.64 + prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:803.5-803.64 + prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:804.5-804.66 + prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:805.5-805.66 + prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:806.5-806.71 + prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec:807.5-807.71 + prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) +} + +;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec +grammar Bexpr : expr + ;; ../../../../specification/wasm-3.0/5.3-binary.instructions.spectec + prod{in_lst : instr*} {{in:Binstr*{in <- in_lst}} {0x0B}} => in_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bsection_(v_N : N, syntax en, grammar BX : en*) : en* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{en_lst : en*, len : nat} {{`%`_byte(v_N,):Bbyte} {`%`_u32(len,):Bu32} {en_lst:BX}} => en_lst + -- if (len = 0) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod eps => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustom : ()* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{Bname} {Bbyte*{}}} => [] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcustomsec : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod Bsection_(0, syntax (), grammar Bcustom) => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btype : type + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{qt : rectype} qt:Brectype => TYPE_type(qt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btypesec : type* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{ty_lst : type*} ty_lst:Bsection_(1, syntax type, grammar Blist(syntax type, grammar Btype)) => ty_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimport : import + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype} {{nm_1:Bname} {nm_2:Bname} {xt:Bexterntype}} => IMPORT_import(nm_1, nm_2, xt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bimportsec : import* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{im_lst : import*} im_lst:Bsection_(2, syntax import, grammar Blist(syntax import, grammar Bimport)) => im_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfuncsec : typeidx* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x_lst : idx*} x_lst:Bsection_(3, syntax typeidx, grammar Blist(syntax typeidx, grammar Btypeidx)) => x_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btable : table + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, ht : heaptype, at : addrtype, lim : limits} tt:Btabletype => TABLE_table(tt, [`REF.NULL`_instr(ht)]) + -- if (tt = `%%%`_tabletype(at, lim, REF_reftype(?(NULL_null), ht))) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tt : tabletype, e : expr} {{0x40} {0x00} {tt:Btabletype} {e:Bexpr}} => TABLE_table(tt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btablesec : table* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tab_lst : table*} tab_lst:Bsection_(4, syntax table, grammar Blist(syntax table, grammar Btable)) => tab_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmem : mem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mt : memtype} mt:Bmemtype => MEMORY_mem(mt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmemsec : mem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{mem_lst : mem*} mem_lst:Bsection_(5, syntax mem, grammar Blist(syntax mem, grammar Bmem)) => mem_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobal : global + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{gt : globaltype, e : expr} {{gt:Bglobaltype} {e:Bexpr}} => GLOBAL_global(gt, e) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bglobalsec : global* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{glob_lst : global*} glob_lst:Bsection_(6, syntax global, grammar Blist(syntax global, grammar Bglobal)) => glob_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexport : export + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{nm : name, xx : externidx} {{nm:Bname} {xx:Bexternidx}} => EXPORT_export(nm, xx) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bexportsec : export* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{ex_lst : export*} ex_lst:Bsection_(7, syntax export, grammar Blist(syntax export, grammar Bexport)) => ex_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstart : start* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{x : idx} x:Bfuncidx => [START_start(x)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bstartsec : start? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{v_startopt : startopt} v_startopt:Bsection_(8, syntax start, grammar Bstart) => !($opt_(syntax start, v_startopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemkind : reftype + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod 0x00 => REF_reftype(?(), FUNC_heaptype) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belem : elem + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{y_lst : idx*, e_o : expr} {{`%`_u32(0,):Bu32} {e_o:Bexpr} {y_lst:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(REF_reftype(?(), FUNC_heaptype), [`REF.FUNC`_instr(y)*{y <- y_lst}], ACTIVE_elemmode(`%`_tableidx(0,), e_o)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, y_lst : idx*} {{`%`_u32(1,):Bu32} {rt:Belemkind} {y_lst:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- y_lst}], PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, y_lst : idx*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Btableidx} {e:Bexpr} {rt:Belemkind} {y_lst:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- y_lst}], ACTIVE_elemmode(x, e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, y_lst : idx*} {{`%`_u32(3,):Bu32} {rt:Belemkind} {y_lst:Blist(syntax funcidx, grammar Bfuncidx)}} => ELEM_elem(rt, [`REF.FUNC`_instr(y)*{y <- y_lst}], DECLARE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{e_lst : expr*, e_O : expr} {{`%`_u32(4,):Bu32} {e_O:Bexpr} {e_lst:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(REF_reftype(?(NULL_null), FUNC_heaptype), e_lst, ACTIVE_elemmode(`%`_tableidx(0,), e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, e_lst : expr*} {{`%`_u32(5,):Bu32} {rt:Breftype} {e_lst:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e_lst, PASSIVE_elemmode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, e_lst : expr*, x : idx, e_O : expr} {{`%`_u32(6,):Bu32} {x:Btableidx} {e_O:Bexpr} {rt:Breftype} {e_lst:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e_lst, ACTIVE_elemmode(x, e_O)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{rt : reftype, e_lst : expr*} {{`%`_u32(7,):Bu32} {rt:Breftype} {e_lst:Blist(syntax expr, grammar Bexpr)}} => ELEM_elem(rt, e_lst, DECLARE_elemmode) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Belemsec : elem* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{elem_lst : elem*} elem_lst:Bsection_(9, syntax elem, grammar Blist(syntax elem, grammar Belem)) => elem_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Blocals : local* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{t : valtype, v_n : n} {{`%`_u32(v_n,):Bu32} {t:Bvaltype}} => LOCAL_local(t)^v_n{} + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bfunc : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{loc_lst_lst : local**, e : expr} {{loc_lst_lst:Blist(syntax local*, grammar Blocals)} {e:Bexpr}} => ($concat_(syntax local, loc_lst_lst), e) + -- if (|$concat_(syntax local, loc_lst_lst)| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcode : code + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{v_code : code, len : nat} {{`%`_u32(len,):Bu32} {v_code:Bfunc}} => v_code + -- if (len = 0) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bcodesec : code* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{code_lst : code*} code_lst:Bsection_(10, syntax code, grammar Blist(syntax code, grammar Bcode)) => code_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdata : data + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{b_lst : byte*, e : expr} {{`%`_u32(0,):Bu32} {e:Bexpr} {b_lst:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b_lst, ACTIVE_datamode(`%`_memidx(0,), e)) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{b_lst : byte*} {{`%`_u32(1,):Bu32} {b_lst:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b_lst, PASSIVE_datamode) + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{b_lst : byte*, x : idx, e : expr} {{`%`_u32(2,):Bu32} {x:Bmemidx} {e:Bexpr} {b_lst:Blist(syntax byte, grammar Bbyte)}} => DATA_data(b_lst, ACTIVE_datamode(x, e)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatasec : data* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{data_lst : data*} data_lst:Bsection_(11, syntax data, grammar Blist(syntax data, grammar Bdata)) => data_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacnt : u32* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{v_n : n} `%`_u32(v_n,):Bu32 => [`%`_u32(v_n,)] + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bdatacntsec : u32? + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{v_nopt : nopt} v_nopt:Bsection_(12, syntax u32, grammar Bdatacnt) => !($opt_(syntax u32, v_nopt)) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btag : tag + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{jt : tagtype} jt:Btagtype => TAG_tag(jt) + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Btagsec : tag* + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{tag_lst : tag*} tag_lst:Bsection_(13, syntax tag, grammar Blist(syntax tag, grammar Btag)) => tag_lst + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmagic : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x00} {0x61} {0x73} {0x6D}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bversion : () + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod {{0x01} {0x00} {0x00} {0x00}} => ((), ()).1 + +;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec +grammar Bmodule : module + ;; ../../../../specification/wasm-3.0/5.4-binary.modules.spectec + prod{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*, typeidx_lst : typeidx*, n_opt : n?, expr_lst : expr*, local_lst_lst : local**} {Bmagic Bversion {Bcustomsec*{}} {type_lst:Btypesec} {Bcustomsec*{}} {import_lst:Bimportsec} {Bcustomsec*{}} {typeidx_lst:Bfuncsec} {Bcustomsec*{}} {table_lst:Btablesec} {Bcustomsec*{}} {mem_lst:Bmemsec} {Bcustomsec*{}} {tag_lst:Btagsec} {Bcustomsec*{}} {global_lst:Bglobalsec} {Bcustomsec*{}} {export_lst:Bexportsec} {Bcustomsec*{}} {start_opt:Bstartsec} {Bcustomsec*{}} {elem_lst:Belemsec} {Bcustomsec*{}} {`%`_u32(v_n,)?{v_n <- n_opt}:Bdatacntsec} {Bcustomsec*{}} {(local_lst, v_expr)*{v_expr <- expr_lst, local_lst <- local_lst_lst}:Bcodesec} {Bcustomsec*{}} {data_lst:Bdatasec} {Bcustomsec*{}}} => MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)) + -- (if (v_n = |data_lst|))?{v_n <- n_opt} + -- if ((n_opt =/= ?()) \/ ($dataidx_funcs(func_lst) = [])) + -- (if (v_func = FUNC_func(v_typeidx, local_lst, v_expr)))*{v_expr <- expr_lst, v_func <- func_lst, local_lst <- local_lst_lst, v_typeidx <- typeidx_lst} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tchar : char + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0x00 | ... | 0xD7FF) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:(0xE000 | ... | 0x10FFFF) => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tsource : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tchar*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TuNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TsNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar TfNplain : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:eps => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x30 | ... | 0x39) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x41 | ... | 0x5A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:(0x61 | ... | 0x7A) => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x21 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x23 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x24 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x25 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x26 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x27 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2B => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x2F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3A => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3D => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x3F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x40 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5E => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x5F => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x60 => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7C => `%`_char(``,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : nat} ``:0x7E => `%`_char(``,) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x30 => 0 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x31 => 1 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x32 => 2 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x33 => 3 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x34 => 4 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x35 => 5 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x36 => 6 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x37 => 7 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x38 => 8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x39 => 9 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexdigit : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x41 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x42 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x43 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x44 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x45 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x46 => 15 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x61 => 10 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x62 => 11 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x63 => 12 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x64 => 13 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x65 => 14 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod 0x66 => 15 + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:22.1-24.46 +grammar Thexnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:23.5-23.21 + prod{h : nat} h:Thexdigit => h + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:24.5-24.46 + prod{v_n : n, h : nat} {{v_n:Thexnum} {"_"?{}} {h:Thexdigit}} => ((16 * v_n) + h) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringchar : char + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tchar => c + -- if (((($proj_char_0(c).0 >= 32) /\ ($proj_char_0(c).0 =/= 127)) /\ (c =/= `%`_char(34,))) /\ (c =/= `%`_char(92,))) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\t" => `%`_char(9,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\n" => `%`_char(10,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\r" => `%`_char(13,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\"" => `%`_char(34,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\'" => `%`_char(39,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "\\\\" => `%`_char(92,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_n : n} {{"\\u{"} {v_n:Thexnum} {"}"}} => `%`_char(v_n,) + -- if ((v_n < 55296) \/ ((57344 <= v_n) /\ (v_n < 1114112))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstringelem : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c : char} c:Tstringchar => $utf8([c]) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{h_1 : nat, h_2 : nat} {{"\\"} {h_1:Thexdigit} {h_2:Thexdigit}} => [`%`_byte(((16 * h_1) + h_2),)] + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tstring : byte* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{b_lst_lst : byte**} {{"\""} {b_lst:Tstringelem*{b_lst <- b_lst_lst}} {"\""}} => $concat_(syntax byte, b_lst_lst) + -- if (|$concat_(syntax byte, b_lst_lst)| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tname : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c_lst : char*, b_lst : byte*} b_lst:Tstring => `%`_name(c_lst,) + -- if (b_lst = $utf8(c_lst)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tid : name + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c_lst : char*} {{"$"} {c_lst:Tidchar+{}}} => `%`_name(c_lst,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{c_lst : char*} {{"$"} {`%`_name(c_lst,):Tname}} => `%`_name(c_lst,) + -- if (|c_lst| > 0) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tkeyword : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{(0x61 | ... | 0x7A)} {Tidchar*{}}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Treserved : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} [``]:{{Tidchar} {Tstring} {","} {";"} {"["} {"]"} {"{"} {"}"}}+{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Ttoken : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tkeyword => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TuNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TsNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:TfNplain => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : byte} [``]:Tstring => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tid => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x28 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x29 => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Treserved => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tannotid : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char} [``]:Tidchar+{} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : name} ``:Tname => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:56.1-57.26 +grammar Tblockcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:57.5-57.26 + prod{`` : ()} ``:{{"(;"} {Tblockchar*{}} {";)"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:60.1-64.18 +grammar Tblockchar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:61.5-61.47 + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:62.5-62.47 + prod{`` : (), c : char} ``:{{";"+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(41,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:63.5-63.47 + prod{`` : (), c : char} ``:{{"("+{}} {c:Tchar}} => (``, ()).1 + -- if ((c =/= `%`_char(59,)) /\ (c =/= `%`_char(40,))) + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:64.5-64.18 + prod{`` : ()} ``:Tblockcomment => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Teof : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : text} ``:"" => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinechar : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : char, c : char} ``:c:Tchar => (``, ()).1 + -- if (($proj_char_0(c).0 =/= 10) /\ ($proj_char_0(c).0 =/= 13)) + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tnewline : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0A => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x0D => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{0x0D} {0x0A}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tlinecomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:{{";;"} {Tlinechar*{}} {Tnewline Teof}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tcomment : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tlinecomment => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tblockcomment => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +grammar Tformat : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : ()} ``:Tnewline => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec + prod{`` : nat} ``:0x09 => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:32.1-33.41 +grammar Tspace : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:33.5-33.41 + prod{`` : ()} [``]:{{" "} Tformat Tcomment Tannot}*{} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:69.1-70.41 +grammar Tannot : () + ;; ../../../../specification/wasm-3.0/6.0-text.lexical.spectec:70.5-70.41 + prod{`` : ()} ``:{{"(@"} Tannotid {{Tspace Ttoken}*{}} {")"}} => (``, ()).1 +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tsign : int + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod eps => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "+" => + (1 : nat <:> int) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "-" => - (1 : nat <:> int) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:18.1-20.40 +grammar Tnum : nat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:19.5-19.18 + prod{d : nat} d:Tdigit => d + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:20.5-20.40 + prod{v_n : n, d : nat} {{v_n:Tnum} {"_"?{}} {d:Tdigit}} => ((10 * v_n) + d) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TuN(v_N : N) : uN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_n : n} v_n:Tnum => `%`_uN(v_n,) + -- if (v_n < (2 ^ v_N)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_n : n} {{"0x"} {v_n:Thexnum}} => `%`_uN(v_n,) + -- if (v_n < (2 ^ v_N)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TsN(v_N : N) : sN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_s : int, v_n : n} {{v_s:Tsign} {`%`_uN(v_n,):TuN(v_N)}} => `%`_sN((v_s * (v_n : nat <:> int)),) + -- if ((- ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int) <= (v_s * (v_n : nat <:> int))) /\ ((v_s * (v_n : nat <:> int)) < ((2 ^ (((v_N : nat <:> int) - (1 : nat <:> int)) : int <:> nat)) : nat <:> int))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TiN(v_N : N) : iN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_n : n} `%`_uN(v_n,):TuN(v_N) => `%`_iN(v_n,) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{i : sN} i:TsN(v_N) => `%`_iN($inv_signed_(v_N, $proj_sN_0(i).0),) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:38.1-40.48 +grammar Tfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:39.5-39.26 + prod{d : nat} d:Tdigit => ((d : nat <:> rat) / (10 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:40.5-40.48 + prod{d : nat, p : rat} {{d:Tdigit} {"_"?{}} {p:Tfrac}} => (((d + ((p / (10 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (10 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:42.1-44.54 +grammar Thexfrac : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:43.5-43.29 + prod{h : nat} h:Thexdigit => ((h : nat <:> rat) / (16 : nat <:> rat)) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec:44.5-44.54 + prod{h : nat, p : rat} {{h:Thexdigit} {"_"?{}} {p:Thexfrac}} => (((h + ((p / (16 : nat <:> rat)) : rat <:> nat)) : nat <:> rat) / (16 : nat <:> rat)) +} + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Tnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Tnum} {"."} {q:Tfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexmant : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat} {{p:Thexnum} {"."?{}}} => (p : nat <:> rat) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : nat, q : rat} {{p:Thexnum} {"."} {q:Thexfrac}} => ((p + (q : rat <:> nat)) : nat <:> rat) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, v_s : int, ee : nat} {{p:Tmant} {{"E"} {"e"}} {v_s:Tsign} {ee:Tnum}} => (p * ((10 ^ ((v_s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Thexfloat : rat + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{p : rat, v_s : int, ee : nat} {{"0x"} {p:Thexmant} {{"P"} {"p"}} {v_s:Tsign} {ee:Tnum}} => (p * ((2 ^ ((v_s * (ee : nat <:> int)) : int <:> nat)) : nat <:> rat)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfNmag(v_N : N) : fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Tfloat => $ieee_(v_N, q) + -- if ($ieee_(v_N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : rat} q:Thexfloat => $ieee_(v_N, q) + -- if ($ieee_(v_N, q) =/= INF_fNmag) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "inf" => INF_fNmag + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod "nan" => NAN_fNmag($canon_(v_N),) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{v_n : n} {{"nan:0x"} {v_n:Thexnum}} => NAN_fNmag(v_n,) + -- if ((1 <= v_n) /\ (v_n < (2 ^ !($signif(v_N))))) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar TfN(v_N : N) : fN + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{+ (1 : nat <:> int):Tsign} {q:TfNmag(v_N)}} => POS_fN(q) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{q : fNmag} {{- (1 : nat <:> int):Tsign} {q:TfNmag(v_N)}} => NEG_fN(q) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tu64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : uN} ``:TuN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti8 : u8 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(8) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti16 : u16 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(16) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti32 : u32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ti64 : u64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : iN} ``:TiN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf32 : f32 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(32) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tf64 : f64 + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : fN} ``:TfN(64) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlist(syntax el, grammar TX : el) : el* + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{el_lst : el*} el:TX*{el <- el_lst} => el_lst + -- if (|el_lst| < (2 ^ 32)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tidx_(ids : name?*) : idx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} x:Tu32 => x + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx, id : name} id:Tid => x + -- if (ids[$proj_uN_0(x).0] = ?(id)) + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttypeidx_(v_I : I) : typeidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.TYPES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttagidx_(v_I : I) : tagidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.TAGS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tglobalidx_(v_I : I) : globalidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.GLOBALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tmemidx_(v_I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.MEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Ttableidx_(v_I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.TABLES_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfuncidx_(v_I : I) : funcidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.FUNCS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tdataidx_(v_I : I) : dataidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.DATAS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Telemidx_(v_I : I) : elemidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.ELEMS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlocalidx_(v_I : I) : localidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.LOCALS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tlabelidx_(v_I : I) : labelidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.LABELS_I) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Tfieldidx__(v_I : I, x : idx) : fieldidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{`` : idx} ``:Tidx_(v_I.FIELDS_I[$proj_uN_0(x).0]) => `` + +;; ../../../../specification/wasm-3.0/6.1-text.values.spectec +grammar Texternidx_(v_I : I) : externidx + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"tag"} {x:Ttagidx_(v_I)} {")"}} => TAG_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"global"} {x:Tglobalidx_(v_I)} {")"}} => GLOBAL_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(v_I)} {")"}} => MEM_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(v_I)} {")"}} => TABLE_externidx(x) + ;; ../../../../specification/wasm-3.0/6.1-text.values.spectec + prod{x : idx} {{"("} {"func"} {x:Tfuncidx_(v_I)} {")"}} => FUNC_externidx(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnumtype : numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f32" => F32_numtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "f64" => F64_numtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvectype : vectype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "v128" => V128_vectype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tabsheaptype : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "any" => ANY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "eq" => EQ_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i31" => I31_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "struct" => STRUCT_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "array" => ARRAY_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "none" => NONE_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "func" => FUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "nofunc" => NOFUNC_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "exn" => EXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noexn" => NOEXN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "extern" => EXTERN_heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "noextern" => NOEXTERN_heaptype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Theaptype_(v_I : I) : heaptype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ht : heaptype} ht:Tabsheaptype => ht + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx} x:Ttypeidx_(v_I) => _IDX_heaptype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tnull : null + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "null" => NULL_null + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Treftype_(v_I : I) : reftype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{null_opt : null?, ht : heaptype} {{"("} {"ref"} {null_opt:Tnull?{}} {ht:Theaptype_(v_I)} {")"}} => REF_reftype(null_opt, ht) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tvaltype_(v_I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{nt : numtype} nt:Tnumtype => $valtype_numtype(nt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{vt : vectype} vt:Tvectype => $valtype_vectype(vt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{rt : reftype} rt:Treftype_(v_I) => $valtype_reftype(rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tpacktype : packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i8" => I8_packtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i16" => I16_packtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tstoragetype_(v_I : I) : storagetype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(v_I) => $storagetype_valtype(t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{pt : packtype} pt:Tpacktype => $storagetype_packtype(pt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfieldtype_(v_I : I) : fieldtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} zt:Tstoragetype_(v_I) => `%%`_fieldtype(?(), zt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{zt : storagetype} {{"("} {"mut"} {zt:Tstoragetype_(v_I)} {")"}} => `%%`_fieldtype(?(MUT_mut), zt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfield_(v_I : I) : (fieldtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype, id_opt : char?} {{"("} {"field"} {?(`%`_name(lift(id_opt),)):Tid?{}} {ft:Tfieldtype_(v_I)} {")"}} => (ft, ?(`%`_name(lift(id_opt),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tparam_(v_I : I) : (valtype, name?) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype, id_opt : char?} {{"("} {"param"} {?(`%`_name(lift(id_opt),)):Tid?{}} {t:Tvaltype_(v_I)} {")"}} => (t, ?(`%`_name(lift(id_opt),))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tresult_(v_I : I) : valtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"result"} {t:Tvaltype_(v_I)} {")"}} => t + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tcomptype_(v_I : I) : (comptype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft_lst : fieldtype*, id_opt_lst : char?*} {{"("} {"struct"} {(ft, ?(`%`_name(lift(id_opt),)))*{ft <- ft_lst, id_opt <- id_opt_lst}:Tlist(syntax (fieldtype, name?), grammar Tfield_(v_I))} {")"}} => (STRUCT_comptype(`%`_list(ft_lst,)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [?(`%`_name(lift(id_opt),))*{id_opt <- id_opt_lst}], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{ft : fieldtype} {{"("} {"array"} {ft:Tfieldtype_(v_I)} {")"}} => (ARRAY_comptype(ft), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t_1_lst : valtype*, t_2_lst : valtype*, id_opt_lst : char?*} {{"("} {"func"} {(t_1, ?(`%`_name(lift(id_opt),)))*{id_opt <- id_opt_lst, t_1 <- t_1_lst}:Tlist(syntax (valtype, name?), grammar Tparam_(v_I))} {t_2_lst:Tlist(syntax valtype, grammar Tresult_(v_I))} {")"}} => (`FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [[?(`%`_name([],))]], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tfinal : final + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "final" => FINAL_final + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tsubtype_(v_I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{fin_opt : final?, x_lst : idx*, ct : comptype, I' : I} {{"("} {"sub"} {fin_opt:Tfinal?{}} {x_lst:Tlist(syntax typeidx, grammar Ttypeidx_(v_I))} {(ct, I'):Tcomptype_(v_I)} {")"}} => (SUB_subtype(fin_opt, _IDX_typeuse(x)*{x <- x_lst}, ct), I') + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypedef_(v_I : I) : (subtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st : subtype, I' : I, id_opt : char?} {{"("} {"type"} {?(`%`_name(lift(id_opt),)):Tid?{}} {(st, I'):Tsubtype_(v_I)} {")"}} => (st, I' +++ {TYPES [?(`%`_name(lift(id_opt),))], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Trectype_(v_I : I) : (rectype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{st_lst : subtype*, I'_lst : I*} {{"("} {"rec"} {(st, I')*{I' <- I'_lst, st <- st_lst}:Tlist(syntax (subtype, idctxt), grammar Ttypedef_(v_I))} {")"}} => (REC_rectype(`%`_list(st_lst,)), $concat_idctxt(I'_lst)) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Taddrtype : addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i32" => I32_addrtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod "i64" => I64_addrtype + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tlimits : limits + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{v_n : n} `%`_u64(v_n,):Tu64 => `[%..%]`_limits(`%`_u64(v_n,), ?()) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{v_n : n, v_m : m} {{`%`_u64(v_n,):Tu64} {`%`_u64(v_m,):Tu64}} => `[%..%]`_limits(`%`_u64(v_n,), ?(`%`_u64(v_m,))) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttypeuse_(v_I : I) : (typeidx, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, st_lst : subtype*, i : n, t_1_lst : valtype*, t_2_lst : valtype*} {{"("} {"type"} {x:Ttypeidx_(v_I)} {")"}} => (x, I') + -- if (v_I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st_lst,)), i))) + -- if (st_lst[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))^|t_1_lst|{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I, id_opt_lst : char?*, t_1_lst : valtype*, t_2_lst : valtype*, st_lst : subtype*, i : n} {{"("} {"type"} {x:Ttypeidx_(v_I)} {")"} {(t_1, ?(`%`_name(lift(id_opt),)))*{id_opt <- id_opt_lst, t_1 <- t_1_lst}:Tparam_(v_I)*{}} {t_2_lst:Tresult_(v_I)*{}}} => (x, I') + -- if (v_I.TYPEDEFS_I[$proj_uN_0(x).0] = ?(_DEF_deftype(REC_rectype(`%`_list(st_lst,)), i))) + -- if (st_lst[i] = SUB_subtype(?(FINAL_final), [], `FUNC%->%`_comptype(`%`_resulttype(t_1_lst,), `%`_resulttype(t_2_lst,)))) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name(lift(id_opt),))*{id_opt <- id_opt_lst}, LABELS [], FIELDS [], TYPEDEFS []}) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttagtype_(v_I : I) : tagtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(v_I) => _IDX_tagtype(x) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tglobaltype_(v_I : I) : globaltype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} t:Tvaltype_(v_I) => `%%`_globaltype(?(), t) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{t : valtype} {{"("} {"mut"} {t:Tvaltype_(v_I)} {")"}} => `%%`_globaltype(?(MUT_mut), t) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Tmemtype_(v_I : I) : memtype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits} {{at:Taddrtype} {lim:Tlimits}} => `%%PAGE`_memtype(at, lim) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Ttabletype_(v_I : I) : tabletype + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{at : addrtype, lim : limits, rt : reftype} {{at:Taddrtype} {lim:Tlimits} {rt:Treftype_(v_I)}} => `%%%`_tabletype(at, lim, rt) + +;; ../../../../specification/wasm-3.0/6.2-text.types.spectec +grammar Texterntype_(v_I : I) : (externtype, idctxt) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{jt : tagtype, id_opt : char?} {{"("} {"tag"} {?(`%`_name(lift(id_opt),)):Tid?{}} {jt:Ttagtype_(v_I)} {")"}} => (TAG_externtype(jt), {TYPES [], TAGS [?(`%`_name(lift(id_opt),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{gt : globaltype, id_opt : char?} {{"("} {"global"} {?(`%`_name(lift(id_opt),)):Tid?{}} {gt:Tglobaltype_(v_I)} {")"}} => (GLOBAL_externtype(gt), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id_opt),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{mt : memtype, id_opt : char?} {{"("} {"memory"} {?(`%`_name(lift(id_opt),)):Tid?{}} {mt:Tmemtype_(v_I)} {")"}} => (MEM_externtype(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id_opt),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{tt : tabletype, id_opt : char?} {{"("} {"table"} {?(`%`_name(lift(id_opt),)):Tid?{}} {tt:Ttabletype_(v_I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id_opt),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.2-text.types.spectec + prod{x : idx, id_opt : char?, I' : I} {{"("} {"func"} {?(`%`_name(lift(id_opt),)):Tid?{}} {(x, I'):Ttypeuse_(v_I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id_opt),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlabel_(v_I : I) : (name?, I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => (?(), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []} +++ v_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ v_I) + -- if ~ (?(id) <- v_I.LABELS_I) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{id : name, x : idx} id:Tid => (?(id), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [?(id)], FIELDS [], TYPEDEFS []} +++ v_I[LABELS_I[$proj_uN_0(x).0] = ?()]) + -- if (?(id) = v_I.LABELS_I[$proj_uN_0(x).0]) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tblocktype_(v_I : I) : blocktype + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{t_opt : valtype?} t_opt:Tresult_(v_I)?{} => _RESULT_blocktype(t_opt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, I' : I} (x, I'):Ttypeuse_(v_I) => _IDX_blocktype(x) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tcatch_(v_I : I) : catch + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch"} {x:Ttagidx_(v_I)} {l:Tlabelidx_(v_I)} {")"}} => CATCH_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, l : labelidx} {{"("} {"catch_ref"} {x:Ttagidx_(v_I)} {l:Tlabelidx_(v_I)} {")"}} => CATCH_REF_catch(x, l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all"} {l:Tlabelidx_(v_I)} {")"}} => CATCH_ALL_catch(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"("} {"catch_all_ref"} {l:Tlabelidx_(v_I)} {")"}} => CATCH_ALL_REF_catch(l) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tfoldedinstr_(v_I : I) : instr* + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tlaneidx : laneidx + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : u8} i:Tu8 => i + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Talign_(v_N : N) : u32 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{v_n : n, v_m : m} {{"align="} {`%`_u64(v_m,):Tu64}} => `%`_u32(v_n,) + -- if (v_m = (2 ^ v_n)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{v_n : n} eps => `%`_u32(v_n,) + -- if (v_N = (2 ^ v_n)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Toffset : u64 + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{v_m : m} {{"offset="} {`%`_u64(v_m,):Tu64}} => `%`_u64(v_m,) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod eps => `%`_u64(0,) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tmemarg_(v_N : N) : memarg + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{v_n : n, v_m : m} {{`%`_u64(v_m,):Toffset} {`%`_u32(v_n,):Talign_(v_N)}} => {ALIGN `%`_u32(v_n,), OFFSET `%`_u64(v_m,)} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Tplaininstr_(v_I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "unreachable" => UNREACHABLE_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "nop" => NOP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "drop" => DROP_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{t_lst_opt : valtype*?} {{"select"} {t_lst:Tresult_(v_I)*{}?{t_lst <- t_lst_opt}}} => SELECT_instr(t_lst_opt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br"} {l:Tlabelidx_(v_I)}} => BR_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_if"} {l:Tlabelidx_(v_I)}} => BR_IF_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l_lst : labelidx*, l' : labelidx} {{"br_table"} {l_lst:Tlabelidx_(v_I)*{}} {l':Tlabelidx_(v_I)}} => BR_TABLE_instr(l_lst, l') + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_null"} {l:Tlabelidx_(v_I)}} => BR_ON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx} {{"br_on_non_null"} {l:Tlabelidx_(v_I)}} => BR_ON_NON_NULL_instr(l) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast"} {l:Tlabelidx_(v_I)} {rt_1:Treftype_(v_I)} {rt_2:Treftype_(v_I)}} => BR_ON_CAST_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{l : labelidx, rt_1 : reftype, rt_2 : reftype} {{"br_on_cast_fail"} {l:Tlabelidx_(v_I)} {rt_1:Treftype_(v_I)} {rt_2:Treftype_(v_I)}} => BR_ON_CAST_FAIL_instr(l, rt_1, rt_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call"} {x:Tfuncidx_(v_I)}} => CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"call_ref"} {x:Ttypeidx_(v_I)}} => CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"call_indirect"} {x:Ttableidx_(v_I)} {(y, I'):Ttypeuse_(v_I)}} => CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "return" => RETURN_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call"} {x:Tfuncidx_(v_I)}} => RETURN_CALL_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"return_call_ref"} {x:Ttypeidx_(v_I)}} => RETURN_CALL_REF_instr(_IDX_typeuse(x)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx, I' : I} {{"return_call_indirect"} {x:Ttableidx_(v_I)} {(y, I'):Ttypeuse_(v_I)}} => RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)) + -- if (I' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS ?(`%`_name([],))*{}, LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"throw"} {x:Ttagidx_(v_I)}} => THROW_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "throw_ref" => THROW_REF_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.get"} {x:Tlocalidx_(v_I)}} => `LOCAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.set"} {x:Tlocalidx_(v_I)}} => `LOCAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"local.tee"} {x:Tlocalidx_(v_I)}} => `LOCAL.TEE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.get"} {x:Tglobalidx_(v_I)}} => `GLOBAL.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"global.set"} {x:Tglobalidx_(v_I)}} => `GLOBAL.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.get"} {x:Ttableidx_(v_I)}} => `TABLE.GET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.set"} {x:Ttableidx_(v_I)}} => `TABLE.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.size"} {x:Ttableidx_(v_I)}} => `TABLE.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.grow"} {x:Ttableidx_(v_I)}} => `TABLE.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"table.fill"} {x:Ttableidx_(v_I)}} => `TABLE.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"table.copy"} {x_1:Ttableidx_(v_I)} {x_2:Ttableidx_(v_I)}} => `TABLE.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"table.init"} {x:Ttableidx_(v_I)} {y:Telemidx_(v_I)}} => `TABLE.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"elem.drop"} {x:Telemidx_(v_I)}} => `ELEM.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => LOAD_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => LOAD_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.load"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => LOAD_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.load"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => LOAD_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load8_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.load16_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => LOAD_instr(I32_numtype, ?(mk_loadop__0_loadop_(I32_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load8_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(8,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load16_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(16,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), S_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.load32_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => LOAD_instr(I64_numtype, ?(mk_loadop__0_loadop_(I64_Inn, `%_%`_loadop_Inn(`%`_sz(32,), U_sx))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(16)}} => VLOAD_instr(V128_vectype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8x8_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16x4_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_s"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32x2_u"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load8_splat"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load16_splat"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_splat"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_splat"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load32_zero"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.load64_zero"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load8_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load16_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load32_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.load64_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => STORE_instr(I32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => STORE_instr(I64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f32.store"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => STORE_instr(F32_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"f64.store"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)}} => STORE_instr(F64_numtype, ?(), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store8"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i32.store16"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => STORE_instr(I32_numtype, ?(mk_storeop__0_storeop_(I32_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store8"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(8,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store16"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(16,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"i64.store32"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)}} => STORE_instr(I64_numtype, ?(mk_storeop__0_storeop_(I64_Inn, `%`_storeop_Inn(`%`_sz(32,),))), x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg} {{"v128.store"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(16)}} => VSTORE_instr(V128_vectype, x, ao) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store8_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(1)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store16_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(2)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store32_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(4)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, ao : memarg, i : laneidx} {{"v128.store64_lane"} {x:Tmemidx_(v_I)} {ao:Tmemarg_(8)} {i:Tlaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.size"} {x:Tmemidx_(v_I)}} => `MEMORY.SIZE`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.grow"} {x:Tmemidx_(v_I)}} => `MEMORY.GROW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"memory.fill"} {x:Tmemidx_(v_I)}} => `MEMORY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"memory.copy"} {x_1:Tmemidx_(v_I)} {x_2:Tmemidx_(v_I)}} => `MEMORY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"memory.init"} {x:Tmemidx_(v_I)} {y:Tdataidx_(v_I)}} => `MEMORY.INIT`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"data.drop"} {x:Tdataidx_(v_I)}} => `DATA.DROP`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{ht : heaptype} {{"ref.null"} {ht:Theaptype_(v_I)}} => `REF.NULL`_instr(ht) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"ref.func"} {x:Tfuncidx_(v_I)}} => `REF.FUNC`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.is_null" => `REF.IS_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.as_non_null" => `REF.AS_NON_NULL`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.eq" => `REF.EQ`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.test"} {rt:Treftype_(v_I)}} => `REF.TEST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{rt : reftype} {{"ref.cast"} {rt:Treftype_(v_I)}} => `REF.CAST`_instr(rt) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "ref.i31" => `REF.I31`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_s" => `I31.GET`_instr(S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i31.get_u" => `I31.GET`_instr(U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new"} {x:Ttypeidx_(v_I)}} => `STRUCT.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"struct.new_default"} {x:Ttypeidx_(v_I)}} => `STRUCT.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get"} {x:Ttypeidx_(v_I)} {i:Tfieldidx__(v_I, x)}} => `STRUCT.GET`_instr(?(), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_s"} {x:Ttypeidx_(v_I)} {i:Tfieldidx__(v_I, x)}} => `STRUCT.GET`_instr(?(S_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.get_u"} {x:Ttypeidx_(v_I)} {i:Tfieldidx__(v_I, x)}} => `STRUCT.GET`_instr(?(U_sx), x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, i : fieldidx} {{"struct.set"} {x:Ttypeidx_(v_I)} {i:Tfieldidx__(v_I, x)}} => `STRUCT.SET`_instr(x, i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new"} {x:Ttypeidx_(v_I)}} => `ARRAY.NEW`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.new_default"} {x:Ttypeidx_(v_I)}} => `ARRAY.NEW_DEFAULT`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, v_n : n} {{"array.new_fixed"} {x:Ttypeidx_(v_I)} {`%`_u32(v_n,):Tu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(v_n,)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_data"} {x:Ttypeidx_(v_I)} {y:Tdataidx_(v_I)}} => `ARRAY.NEW_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.new_elem"} {x:Ttypeidx_(v_I)} {y:Telemidx_(v_I)}} => `ARRAY.NEW_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get"} {x:Ttypeidx_(v_I)}} => `ARRAY.GET`_instr(?(), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_s"} {x:Ttypeidx_(v_I)}} => `ARRAY.GET`_instr(?(S_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.get_u"} {x:Ttypeidx_(v_I)}} => `ARRAY.GET`_instr(?(U_sx), x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.set"} {x:Ttypeidx_(v_I)}} => `ARRAY.SET`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "array.len" => `ARRAY.LEN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx} {{"array.fill"} {x:Ttypeidx_(v_I)}} => `ARRAY.FILL`_instr(x) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x_1 : idx, x_2 : idx} {{"array.copy"} {x_1:Ttypeidx_(v_I)} {x_2:Ttypeidx_(v_I)}} => `ARRAY.COPY`_instr(x_1, x_2) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_data"} {x:Ttypeidx_(v_I)} {y:Tdataidx_(v_I)}} => `ARRAY.INIT_DATA`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{x : idx, y : idx} {{"array.init_elem"} {x:Ttypeidx_(v_I)} {y:Telemidx_(v_I)}} => `ARRAY.INIT_ELEM`_instr(x, y) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "any.convert_extern" => `ANY.CONVERT_EXTERN`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "extern.convert_any" => `EXTERN.CONVERT_ANY`_instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u32} {{"i32.const"} {c:Ti32}} => CONST_instr(I32_numtype, mk_num__0_num_(I32_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : u64} {{"i64.const"} {c:Ti64}} => CONST_instr(I64_numtype, mk_num__0_num_(I64_Inn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f32} {{"f32.const"} {c:Tf32}} => CONST_instr(F32_numtype, mk_num__1_num_(F32_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c : f64} {{"f64.const"} {c:Tf64}} => CONST_instr(F64_numtype, mk_num__1_num_(F64_Fnn, c)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eqz" => TESTOP_instr(I32_numtype, mk_testop__0_testop_(I32_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eqz" => TESTOP_instr(I64_numtype, mk_testop__0_testop_(I64_Inn, EQZ_testop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.eq" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ne" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.lt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.gt_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.le_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_s" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ge_u" => RELOP_instr(I32_numtype, mk_relop__0_relop_(I32_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.eq" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, EQ_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ne" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, NE_relop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.lt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.gt_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GT_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.le_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, LE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_s" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ge_u" => RELOP_instr(I64_numtype, mk_relop__0_relop_(I64_Inn, GE_relop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.eq" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ne" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.lt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.gt" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.le" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ge" => RELOP_instr(F32_numtype, mk_relop__1_relop_(F32_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.eq" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, EQ_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ne" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, NE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.lt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.gt" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GT_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.le" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, LE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ge" => RELOP_instr(F64_numtype, mk_relop__1_relop_(F64_Fnn, GE_relop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.clz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.ctz" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.popcnt" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend8_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.extend16_s" => UNOP_instr(I32_numtype, mk_unop__0_unop_(I32_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.clz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CLZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.ctz" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, CTZ_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.popcnt" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, POPCNT_unop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend8_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(8,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend16_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(16,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend32_s" => UNOP_instr(I64_numtype, mk_unop__0_unop_(I64_Inn, EXTEND_unop_Inn(`%`_sz(32,),))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.abs" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.neg" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sqrt" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.ceil" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.floor" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.trunc" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.nearest" => UNOP_instr(F32_numtype, mk_unop__1_unop_(F32_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.abs" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, ABS_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.neg" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEG_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sqrt" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, SQRT_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.ceil" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, CEIL_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.floor" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, FLOOR_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.trunc" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, TRUNC_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.nearest" => UNOP_instr(F64_numtype, mk_unop__1_unop_(F64_Fnn, NEAREST_unop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.add" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.sub" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.mul" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.div_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rem_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.and" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.or" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.xor" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_s" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.shr_u" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotl" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.rotr" => BINOP_instr(I32_numtype, mk_binop__0_binop_(I32_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.add" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ADD_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.sub" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SUB_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.mul" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, MUL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.div_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, DIV_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rem_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, REM_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.and" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, AND_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.or" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, OR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.xor" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, XOR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_s" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.shr_u" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, SHR_binop_Inn(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotl" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTL_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.rotr" => BINOP_instr(I64_numtype, mk_binop__0_binop_(I64_Inn, ROTR_binop_Inn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.add" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.sub" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.mul" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.div" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.min" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.max" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.copysign" => BINOP_instr(F32_numtype, mk_binop__1_binop_(F32_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.add" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, ADD_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.sub" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, SUB_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.mul" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MUL_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.div" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, DIV_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.min" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MIN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.max" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, MAX_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.copysign" => BINOP_instr(F64_numtype, mk_binop__1_binop_(F64_Fnn, COPYSIGN_binop_Fnn)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.wrap_i64" => CVTOP_instr(I32_numtype, I64_numtype, mk_cvtop___0_cvtop__(I64_Inn, I32_Inn, WRAP_cvtop__Inn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_s" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f32_u" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_s" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.trunc_sat_f64_u" => CVTOP_instr(I32_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I32_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_s" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.extend_i32_u" => CVTOP_instr(I64_numtype, I32_numtype, mk_cvtop___0_cvtop__(I32_Inn, I64_Inn, EXTEND_cvtop__Inn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_s" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f32_u" => CVTOP_instr(I64_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_s" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.trunc_sat_f64_u" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, TRUNC_SAT_cvtop__Fnn_1_Inn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.demote_f64" => CVTOP_instr(F32_numtype, F64_numtype, mk_cvtop___3_cvtop__(F64_Fnn, F32_Fnn, DEMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_s" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i32_u" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_s" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.convert_i64_u" => CVTOP_instr(F32_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F32_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.promote_f32" => CVTOP_instr(F64_numtype, F32_numtype, mk_cvtop___3_cvtop__(F32_Fnn, F64_Fnn, PROMOTE_cvtop__Fnn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_s" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i32_u" => CVTOP_instr(F64_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_s" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.convert_i64_u" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, CONVERT_cvtop__Inn_1_Fnn_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32.reinterpret_f32" => CVTOP_instr(I32_numtype, F32_numtype, mk_cvtop___2_cvtop__(F32_Fnn, I32_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64.reinterpret_f64" => CVTOP_instr(I64_numtype, F64_numtype, mk_cvtop___2_cvtop__(F64_Fnn, I64_Inn, REINTERPRET_cvtop__Fnn_1_Inn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32.reinterpret_i32" => CVTOP_instr(F32_numtype, I32_numtype, mk_cvtop___1_cvtop__(I32_Inn, F32_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64.reinterpret_i64" => CVTOP_instr(F64_numtype, I64_numtype, mk_cvtop___1_cvtop__(I64_Inn, F64_Fnn, REINTERPRET_cvtop__Inn_1_Fnn_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : u8*} {{"v128.const"} {"i8x16"} {c_lst:Ti8^16{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(8, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : u16*} {{"v128.const"} {"i16x8"} {c_lst:Ti16^8{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(16, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : u32*} {{"v128.const"} {"i32x4"} {c_lst:Ti32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(32, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : u64*} {{"v128.const"} {"i64x2"} {c_lst:Ti64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $ibytes_(64, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : f32*} {{"v128.const"} {"f32x4"} {c_lst:Tf32^4{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(32, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{c_lst : f64*} {{"v128.const"} {"f64x2"} {c_lst:Tf64^2{}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, $concat_(syntax byte, $fbytes_(64, c)*{c <- c_lst}))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i_lst : laneidx*} {{"i8x16.shuffle"} {i_lst:Tlaneidx^16{}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), i_lst) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_swizzle" => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vswizzlop__0_vswizzlop_(`%`_M(16,), RELAXED_SWIZZLE_vswizzlop_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.splat" => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.splat" => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.splat" => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.splat" => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.splat" => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.splat" => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_s"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.extract_lane_u"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.extract_lane"} {i:Tlaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i8x16.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i16x8.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"i64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f32x4.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{i : laneidx} {{"f64x2.replace_lane"} {i:Tlaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), i) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.any_true" => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.all_true" => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vtestop__0_vtestop_(I8_Jnn, `%`_M(16,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.all_true" => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vtestop__0_vtestop_(I16_Jnn, `%`_M(8,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.all_true" => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vtestop__0_vtestop_(I32_Jnn, `%`_M(4,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.all_true" => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vtestop__0_vtestop_(I64_Jnn, `%`_M(2,), ALL_TRUE_vtestop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.eq" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ne" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.lt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.gt_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.le_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_s" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.ge_u" => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vrelop__0_vrelop_(I8_Jnn, `%`_M(16,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.eq" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ne" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.lt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.gt_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.le_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_s" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.ge_u" => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vrelop__0_vrelop_(I16_Jnn, `%`_M(8,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.eq" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ne" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.lt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.gt_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GT_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.le_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), LE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_s" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.ge_u" => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vrelop__0_vrelop_(I32_Jnn, `%`_M(4,), GE_vrelop_Jnn_M(U_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.eq" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), EQ_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ne" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), NE_vrelop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.lt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.gt_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GT_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.le_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), LE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.ge_s" => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vrelop__0_vrelop_(I64_Jnn, `%`_M(2,), GE_vrelop_Jnn_M(S_sx,))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.eq" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ne" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.lt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.gt" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.le" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ge" => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vrelop__1_vrelop_(F32_Fnn, `%`_M(4,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.eq" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), EQ_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ne" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), NE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.lt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.gt" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GT_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.le" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), LE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ge" => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vrelop__1_vrelop_(F64_Fnn, `%`_M(2,), GE_vrelop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.not" => VVUNOP_instr(V128_vectype, NOT_vvunop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.abs" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.neg" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.popcnt" => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vunop__0_vunop_(I8_Jnn, `%`_M(16,), POPCNT_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.abs" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.neg" => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vunop__0_vunop_(I16_Jnn, `%`_M(8,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.abs" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.neg" => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vunop__0_vunop_(I32_Jnn, `%`_M(4,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.abs" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), ABS_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.neg" => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vunop__0_vunop_(I64_Jnn, `%`_M(2,), NEG_vunop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.abs" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.neg" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sqrt" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.ceil" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.floor" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.trunc" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.nearest" => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vunop__1_vunop_(F32_Fnn, `%`_M(4,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.abs" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), ABS_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.neg" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEG_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sqrt" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), SQRT_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.ceil" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), CEIL_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.floor" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), FLOOR_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.trunc" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), TRUNC_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.nearest" => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vunop__1_vunop_(F64_Fnn, `%`_M(2,), NEAREST_vunop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.and" => VVBINOP_instr(V128_vectype, AND_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.andnot" => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.or" => VVBINOP_instr(V128_vectype, OR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.xor" => VVBINOP_instr(V128_vectype, XOR_vvbinop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.add_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.sub_sat_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.min_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_s" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.max_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.avgr_u" => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vbinop__0_vbinop_(I8_Jnn, `%`_M(16,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.add_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), ADD_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.sub_sat_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), SUB_SAT_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.mul" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.min_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.max_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.avgr_u" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), AVGRU_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.q15mulr_sat_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), Q15MULR_SATS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_q15mulr_s" => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vbinop__0_vbinop_(I16_Jnn, `%`_M(8,), RELAXED_Q15MULRS_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.add" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.sub" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.mul" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.min_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MIN_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_s" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.max_u" => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vbinop__0_vbinop_(I32_Jnn, `%`_M(4,), MAX_vbinop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.add" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), ADD_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.sub" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), SUB_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.mul" => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vbinop__0_vbinop_(I64_Jnn, `%`_M(2,), MUL_vbinop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.add" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.sub" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.mul" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.div" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmin" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.pmax" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_min" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_max" => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vbinop__1_vbinop_(F32_Fnn, `%`_M(4,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.add" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), ADD_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.sub" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), SUB_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.mul" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MUL_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.div" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), DIV_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmin" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.pmax" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), PMAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_min" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MIN_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_max" => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vbinop__1_vbinop_(F64_Fnn, `%`_M(2,), RELAXED_MAX_vbinop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "v128.bitselect" => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vternop__0_vternop_(I8_Jnn, `%`_M(16,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vternop__0_vternop_(I16_Jnn, `%`_M(8,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vternop__0_vternop_(I32_Jnn, `%`_M(4,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.relaxed_laneselect" => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), mk_vternop__0_vternop_(I64_Jnn, `%`_M(2,), RELAXED_LANESELECT_vternop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vternop__1_vternop_(F32_Fnn, `%`_M(4,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_madd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_MADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.relaxed_nmadd" => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vternop__1_vternop_(F64_Fnn, `%`_M(2,), RELAXED_NMADD_vternop_Fnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vshiftop__0_vshiftop_(I8_Jnn, `%`_M(16,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vshiftop__0_vshiftop_(I16_Jnn, `%`_M(8,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vshiftop__0_vshiftop_(I32_Jnn, `%`_M(4,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shl" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHL_vshiftop_Jnn_M)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_s" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.shr_u" => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), mk_vshiftop__0_vshiftop_(I64_Jnn, `%`_M(2,), SHR_vshiftop_Jnn_M(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.bitmask" => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i8x16.narrow_i16x8_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_s" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.narrow_i32x4_u" => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_low_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_s" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extend_high_i8x16_u" => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), mk_vcvtop___0_vcvtop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_low_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extend_high_i16x8_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), mk_vcvtop___0_vcvtop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.trunc_sat_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), TRUNC_SAT_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_s" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f32x4_u" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___2_vcvtop__(F32_Fnn, `%`_M(4,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?()))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_s_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(S_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_trunc_f64x2_u_zero" => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___2_vcvtop__(F64_Fnn, `%`_M(2,), I32_Jnn, `%`_M(4,), RELAXED_TRUNC_vcvtop__Fnn_1_M_1_Jnn_2_M_2(U_sx, ?(ZERO_zero)))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_s" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extend_high_i32x4_u" => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___0_vcvtop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTEND_vcvtop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.demote_f64x2_zero" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), mk_vcvtop___3_vcvtop__(F64_Fnn, `%`_M(2,), F32_Fnn, `%`_M(4,), DEMOTE_vcvtop__Fnn_1_M_1_Fnn_2_M_2(ZERO_zero))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_s" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f32x4.convert_i32x4_u" => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F32_Fnn, `%`_M(4,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.promote_low_f32x4" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), mk_vcvtop___3_vcvtop__(F32_Fnn, `%`_M(4,), F64_Fnn, `%`_M(2,), PROMOTELOW_vcvtop__Fnn_1_M_1_Fnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_s" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "f64x2.convert_low_i32x4_u" => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), mk_vcvtop___1_vcvtop__(I32_Jnn, `%`_M(4,), F64_Fnn, `%`_M(2,), CONVERT_vcvtop__Jnn_1_M_1_Fnn_2_M_2(?(LOW_half), U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extadd_pairwise_i8x16_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextunop___0_vextunop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_s" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extadd_pairwise_i16x8_u" => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextunop___0_vextunop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTADD_PAIRWISE_vextunop__Jnn_1_M_1_Jnn_2_M_2(U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_low_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.extmul_high_i8x16_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i16x8.relaxed_dot_i8x16_i7x16_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextbinop___0_vextbinop__(I8_Jnn, `%`_M(16,), I16_Jnn, `%`_M(8,), RELAXED_DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_low_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.extmul_high_i16x8_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.dot_i16x8_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), mk_vextbinop___0_vextbinop__(I16_Jnn, `%`_M(8,), I32_Jnn, `%`_M(4,), DOTS_vextbinop__Jnn_1_M_1_Jnn_2_M_2)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_low_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(LOW_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_s" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, S_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i64x2.extmul_high_i32x4_u" => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), mk_vextbinop___0_vextbinop__(I32_Jnn, `%`_M(4,), I64_Jnn, `%`_M(2,), EXTMUL_vextbinop__Jnn_1_M_1_Jnn_2_M_2(HIGH_half, U_sx))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod "i32x4.relaxed_dot_i8x16_i7x16_add_s" => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), mk_vextternop___0_vextternop__(I8_Jnn, `%`_M(16,), I32_Jnn, `%`_M(4,), RELAXED_DOT_ADDS_vextternop__Jnn_1_M_1_Jnn_2_M_2)) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +rec { + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:15.1-17.29 +grammar Tinstr_(v_I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:16.5-16.29 + prod{in : instr} in:Tplaininstr_(v_I) => in + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:17.5-17.29 + prod{in : instr} in:Tblockinstr_(v_I) => in + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:23.1-24.52 +grammar Tinstrs_(v_I : I) : instr* + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:20.5-20.27 + prod{in_lst : instr*} in_lst:Tinstr_(v_I)*{} => in_lst + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:24.5-24.52 + prod{in_lst_lst : instr**} in_lst_lst:Tfoldedinstr_(v_I)*{} => $concat_(syntax instr, in_lst_lst) + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:88.1-90.65 +grammar Tblockinstr_(v_I : I) : instr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:63.5-67.35 + prod{bt : blocktype, in_lst : instr*, id_opt : char?, I' : I, id'_opt : char?} {{"block"} {(?(`%`_name(lift(id_opt),)), I'):Tlabel_(v_I)} {bt:Tblocktype_(v_I)} {in_lst:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'_opt),)):Tid?{}}} => BLOCK_instr(bt, in_lst) + -- if ((id'_opt = ?()) \/ (id'_opt = id_opt)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:68.5-72.35 + prod{bt : blocktype, in_lst : instr*, id_opt : char?, I' : I, id'_opt : char?} {{"loop"} {(?(`%`_name(lift(id_opt),)), I'):Tlabel_(v_I)} {bt:Tblocktype_(v_I)} {in_lst:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'_opt),)):Tid?{}}} => LOOP_instr(bt, in_lst) + -- if ((id'_opt = ?()) \/ (id'_opt = id_opt)) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:73.5-79.71 + prod{bt : blocktype, in_1_lst : instr*, in_2_lst : instr*, id_opt : char?, I' : I, id_1_opt : char?, id_2_opt : char?} {{"if"} {(?(`%`_name(lift(id_opt),)), I'):Tlabel_(v_I)} {bt:Tblocktype_(v_I)} {in_1_lst:Tinstrs_(I')} {"else"} {?(`%`_name(lift(id_1_opt),)):Tid?{}} {in_2_lst:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id_2_opt),)):Tid?{}}} => `IF%%ELSE%`_instr(bt, in_1_lst, in_2_lst) + -- if (((id_1_opt = ?()) \/ (id_1_opt = id_opt)) /\ ((id_2_opt = ?()) \/ (id_2_opt = id_opt))) + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec:80.5-85.35 + prod{bt : blocktype, c_lst : catch*, in_lst : instr*, id_opt : char?, I' : I, id'_opt : char?} {{"try_table"} {(?(`%`_name(lift(id_opt),)), I'):Tlabel_(v_I)} {bt:Tblocktype_(v_I)} {c_lst:Tcatch_(v_I)*{}} {in_lst:Tinstrs_(I')} {"end"} {?(`%`_name(lift(id'_opt),)):Tid?{}}} => TRY_TABLE_instr(bt, `%`_list(c_lst,), in_lst) + -- if ((id'_opt = ?()) \/ (id'_opt = id_opt)) +} + +;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec +grammar Texpr_(v_I : I) : expr + ;; ../../../../specification/wasm-3.0/6.3-text.instructions.spectec + prod{in_lst : instr*} in_lst:Tinstrs_(v_I) => in_lst + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttype_(v_I : I) : (type, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{qt : rectype, I' : I, I'' : I, v_n : n, st_lst : subtype*} (qt, I'):Trectype_(v_I) => (TYPE_type(qt), I' +++ I'') + -- if (qt = REC_rectype(`%`_list(st_lst,))) + -- if (I'' = {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS ?(_DEF_deftype(qt, i))^(i (TAG_tag(jt), {TYPES [], TAGS [?(`%`_name(lift(id_opt),))], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tglobal_(v_I : I) : (global, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{gt : globaltype, e : expr, id_opt : char?} {{"("} {"global"} {?(`%`_name(lift(id_opt),)):Tid?{}} {gt:Tglobaltype_(v_I)} {e:Texpr_(v_I)} {")"}} => (GLOBAL_global(gt, e), {TYPES [], TAGS [], GLOBALS [?(`%`_name(lift(id_opt),))], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmem_(v_I : I) : (mem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{mt : memtype, id_opt : char?} {{"("} {"memory"} {?(`%`_name(lift(id_opt),)):Tid?{}} {mt:Tmemtype_(v_I)} {")"}} => (MEMORY_mem(mt), {TYPES [], TAGS [], GLOBALS [], MEMS [?(`%`_name(lift(id_opt),))], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttable_(v_I : I) : (table, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{tt : tabletype, e : expr, id_opt : char?} {{"("} {"table"} {?(`%`_name(lift(id_opt),)):Tid?{}} {tt:Ttabletype_(v_I)} {e:Texpr_(v_I)} {")"}} => (TABLE_table(tt, e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id_opt),))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tlocal_(v_I : I) : (local*, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{t : valtype, id_opt : char?} {{"("} {"local"} {?(`%`_name(lift(id_opt),)):Tid?{}} {t:Tvaltype_(v_I)} {")"}} => ([LOCAL_local(t)], {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [?(`%`_name(lift(id_opt),))], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tfunc_(v_I : I) : (func, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx, loc_lst_lst : local**, e : expr, id_opt : char?, I_1 : I, I_2_lst : I*, I' : I} {{"("} {"func"} {?(`%`_name(lift(id_opt),)):Tid?{}} {(x, I_1):Ttypeuse_(v_I)} {(loc_lst, I_2):Tlocal_(v_I)*{I_2 <- I_2_lst, loc_lst <- loc_lst_lst}} {e:Texpr_(I')} {")"}} => (FUNC_func(x, $concat_(syntax local, loc_lst_lst), e), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id_opt),))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + -- if (I' = v_I +++ I_1 +++ $concat_idctxt(I_2_lst)) + -- Idctxt_ok: `|-%:OK`(I',) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatastring : byte* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{b_lst_lst : byte**} b_lst_lst:Tstring*{} => $concat_(syntax byte, b_lst_lst) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmemuse_(v_I : I) : memidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"memory"} {x:Tmemidx_(v_I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Toffsetexpr_(v_I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"offset"} {e:Texpr_(v_I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdata_(v_I : I) : (data, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{b_lst : byte*, id_opt : char?} {{"("} {"data"} {?(`%`_name(lift(id_opt),)):Tid?{}} {b_lst:Tdatastring} {")"}} => (DATA_data(b_lst, PASSIVE_datamode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id_opt),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{b_lst : byte*, x : idx, e : expr, id_opt : char?} {{"("} {"data"} {?(`%`_name(lift(id_opt),)):Tid?{}} {x:Tmemuse_(v_I)} {e:Toffsetexpr_(v_I)} {b_lst:Tdatastring} {")"}} => (DATA_data(b_lst, ACTIVE_datamode(x, e)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [?(`%`_name(lift(id_opt),))], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemexpr_(v_I : I) : expr + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{e : expr} {{"("} {"item"} {e:Texpr_(v_I)} {")"}} => e + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemlist_(v_I : I) : (reftype, expr*) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, e_lst : expr*} {{rt:Treftype_(v_I)} {e_lst:Tlist(syntax expr, grammar Telemexpr_(v_I))}} => (rt, e_lst) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Ttableuse_(v_I : I) : tableidx + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"table"} {x:Ttableidx_(v_I)} {")"}} => x + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telem_(v_I : I) : (elem, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, e_lst : expr*, id_opt : char?} {{"("} {"elem"} {?(`%`_name(lift(id_opt),)):Tid?{}} {(rt, e_lst):Telemlist_(v_I)} {")"}} => (ELEM_elem(rt, e_lst, PASSIVE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id_opt),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, e_lst : expr*, x : idx, e' : expr, id_opt : char?} {{"("} {"elem"} {?(`%`_name(lift(id_opt),)):Tid?{}} {x:Ttableuse_(v_I)} {e':Toffsetexpr_(v_I)} {(rt, e_lst):Telemlist_(v_I)} {")"}} => (ELEM_elem(rt, e_lst, ACTIVE_elemmode(x, e')), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id_opt),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{rt : reftype, e_lst : expr*, id_opt : char?} {{"("} {"elem"} {?(`%`_name(lift(id_opt),)):Tid?{}} {"declare"} {(rt, e_lst):Telemlist_(v_I)} {")"}} => (ELEM_elem(rt, e_lst, DECLARE_elemmode), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [?(`%`_name(lift(id_opt),))], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tstart_(v_I : I) : (start, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{x : idx} {{"("} {"start"} {x:Tfuncidx_(v_I)} {")"}} => (START_start(x), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timport_(v_I : I) : (import, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm_1 : name, nm_2 : name, xt : externtype, I' : I} {{"("} {"import"} {nm_1:Tname} {nm_2:Tname} {(xt, I'):Texterntype_(v_I)} {")"}} => (IMPORT_import(nm_1, nm_2, xt), I') + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texport_(v_I : I) : (export, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{nm : name, xx : externidx} {{"("} {"export"} {nm:Tname} {xx:Texternidx_(v_I)} {")"}} => (EXPORT_export(nm, xx), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"export"} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Timportdots : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{"("} {"import"} {Tname} {Tname} {")"}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttagdots_(v_I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttagtype_(v_I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttagtype_(v_I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobaldots_(v_I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tglobaltype_(v_I)} {Texpr_(v_I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tglobaltype_(v_I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmemdots_(v_I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Tmemtype_(v_I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {"("} {"data"} {Tdatastring} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Tmemtype_(v_I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttabledots_(v_I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttabletype_(v_I)} {Texpr_(v_I)?{}}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Taddrtype?{}} {Treftype_(v_I)} {"("} {"elem"} {Telemlist_(v_I)} {")"}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttabletype_(v_I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfuncdots_(v_I : I) : () + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} {Ttypeuse_(v_I)} {Tlocal_(v_I)*{}} {Texpr_(v_I)}} => (``, ()).1 + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : ()} ``:{{Texportdots*{}} Timportdots {Ttypeuse_(v_I)}} => (``, ()).1 + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttag_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportglobal_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportmem_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texporttable_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Texportfunc_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdatamem_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Telemtable_(v_I : I) : () + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecl_(v_I : I) : (decl, idctxt) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (type, idctxt)} ``:Ttype_(v_I) => ($decl_type(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (import, idctxt)} ``:Timport_(v_I) => ($decl_import(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (tag, idctxt)} ``:Ttag_(v_I) => ($decl_tag(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (global, idctxt)} ``:Tglobal_(v_I) => ($decl_global(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (mem, idctxt)} ``:Tmem_(v_I) => ($decl_mem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (table, idctxt)} ``:Ttable_(v_I) => ($decl_table(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (func, idctxt)} ``:Tfunc_(v_I) => ($decl_func(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (data, idctxt)} ``:Tdata_(v_I) => ($decl_data(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (elem, idctxt)} ``:Telem_(v_I) => ($decl_elem(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (start, idctxt)} ``:Tstart_(v_I) => ($decl_start(``.0), ``.1) + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (export, idctxt)} ``:Texport_(v_I) => ($decl_export(``.0), ``.1) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tmodule : module + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{type_lst : type*, import_lst : import*, tag_lst : tag*, global_lst : global*, mem_lst : mem*, table_lst : table*, func_lst : func*, data_lst : data*, elem_lst : elem*, start_opt : start?, export_lst : export*, I_lst : I*, decl_lst : decl*, I' : I} {{"("} {"module"} {Tid?{}} {(v_decl, v_I)*{v_I <- I_lst, v_decl <- decl_lst}:Tdecl_(I')*{}} {")"}} => MODULE_module(`%`_list(type_lst,), `%`_list(import_lst,), `%`_list(tag_lst,), `%`_list(global_lst,), `%`_list(mem_lst,), `%`_list(table_lst,), `%`_list(func_lst,), `%`_list(data_lst,), `%`_list(elem_lst,), start_opt, `%`_list(export_lst,)) + -- if (I' = $concat_idctxt(I_lst)) + -- Idctxt_ok: `|-%:OK`(I',) + -- if (type_lst = $typesd(decl_lst)) + -- if (import_lst = $importsd(decl_lst)) + -- if (tag_lst = $tagsd(decl_lst)) + -- if (global_lst = $globalsd(decl_lst)) + -- if (mem_lst = $memsd(decl_lst)) + -- if (table_lst = $tablesd(decl_lst)) + -- if (func_lst = $funcsd(decl_lst)) + -- if (data_lst = $datasd(decl_lst)) + -- if (elem_lst = $elemsd(decl_lst)) + -- if (lift(start_opt) = $startsd(decl_lst)) + -- if (export_lst = $exportsd(decl_lst)) + -- if $ordered(decl_lst) + +;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec +grammar Tdecldots_(v_I : I) : (decl, idctxt)* + ;; ../../../../specification/wasm-3.0/6.4-text.modules.spectec + prod{`` : (decl, idctxt)} [``]:Tdecl_(v_I)*{} => [``] + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsym : A + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod Bvar(syntax B) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod {Bvar(syntax symdots) Bvar(syntax B)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec +grammar Bsymsplit : () + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.4-notation.binary.spectec + prod{`` : ()} ``:Bvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tvar(syntax X) : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod 0x00 => ((), ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsym : A + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod Tvar(syntax T) => $var(syntax A) + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod {Tvar(syntax symdots) Tvar(syntax T)} => $var(syntax A) + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tsymsplit : () + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + ;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec + prod{`` : ()} ``:Tvar(syntax B) => (``, ()).1 + +;; ../../../../specification/wasm-3.0/X.5-notation.text.spectec +grammar Tabbrev : () + diff --git a/spectec/test-middlend/test.spectec b/spectec/test-middlend/test.spectec index e5fb87f9c3..0806ffe0ce 100644 --- a/spectec/test-middlend/test.spectec +++ b/spectec/test-middlend/test.spectec @@ -33,3 +33,26 @@ def $testtrue(b) = b def $testfalse(Bool($sidef(11))) : Bool(false) def $testfalse(b) = b + + +;; +;; Totalize testing some tricky totalize functionality +;; + +def $t_totalize(nat) : nat hint(partial) +def $t_totalize(3) = 5 +def $t_totalize(10) = 20 + +def $t_totalize2(nat) : nat hint(partial) +def $t_totalize2(1) = 2 +def $t_totalize2(n) = $t_totalize(n) + +def $t_totalize3(nat) : nat hint(partial) +def $t_totalize3(n) = $($t_totalize(n) + $t_totalize2($(n + 10))) + +;; Partial functions calls in partial functions not supported +;; def $t_totalize3(nat) : nat hint(partial) +;; def $t_totalize3(n) = $($t_totalize(n) + $t_totalize2($t_totalize(n))) +;; +;; def $t_totalize4(nat) : nat hint(partial) +;; def $t_totalize4(n) = $t_totalize($t_totalize(n)) diff --git a/spectec/test-middlend/test.spectec.exp b/spectec/test-middlend/test.spectec.exp new file mode 100644 index 0000000000..78238d2c5b --- /dev/null +++ b/spectec/test-middlend/test.spectec.exp @@ -0,0 +1,1340 @@ +== Parsing... +== Elaboration... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool(bool : bool) + ;; test.spectec + syntax Bool(true) = nat + + + ;; test.spectec + syntax Bool(false) = text + + +;; test.spectec +def $testtrue(Bool : Bool($sidef(1))) : Bool(true) + ;; test.spectec + def $testtrue{b : Bool($sidef(1))}(b) = b + +;; test.spectec +def $testfalse(Bool : Bool($sidef(11))) : Bool(false) + ;; test.spectec + def $testfalse{b : Bool($sidef(11))}(b) = b + +;; test.spectec +def $t_totalize(nat : nat) : nat + ;; test.spectec + def $t_totalize(3) = 5 + ;; test.spectec + def $t_totalize(10) = 20 + +;; test.spectec +def $t_totalize2(nat : nat) : nat + ;; test.spectec + def $t_totalize2(1) = 2 + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat + ;; test.spectec + def $t_totalize3{n : nat}(n) = ($t_totalize(n) + $t_totalize2((n + 10))) + +== IL Validation... +== Running pass ite... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool(bool : bool) + ;; test.spectec + syntax Bool(true) = nat + + + ;; test.spectec + syntax Bool(false) = text + + +;; test.spectec +def $testtrue(Bool : Bool($sidef(1))) : Bool(true) + ;; test.spectec + def $testtrue{b : Bool($sidef(1))}(b) = b + +;; test.spectec +def $testfalse(Bool : Bool($sidef(11))) : Bool(false) + ;; test.spectec + def $testfalse{b : Bool($sidef(11))}(b) = b + +;; test.spectec +def $t_totalize(nat : nat) : nat + ;; test.spectec + def $t_totalize(3) = 5 + ;; test.spectec + def $t_totalize(10) = 20 + +;; test.spectec +def $t_totalize2(nat : nat) : nat + ;; test.spectec + def $t_totalize2(1) = 2 + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat + ;; test.spectec + def $t_totalize3{n : nat}(n) = ($t_totalize(n) + $t_totalize2((n + 10))) + +== IL Validation after pass ite... +== Running pass let-intro-mech... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool(bool : bool) + ;; test.spectec + syntax Bool(true) = nat + + + ;; test.spectec + syntax Bool(false) = text + + +;; test.spectec +def $testtrue(Bool : Bool($sidef(1))) : Bool(true) + ;; test.spectec + def $testtrue{b : Bool($sidef(1))}(b) = b + +;; test.spectec +def $testfalse(Bool : Bool($sidef(11))) : Bool(false) + ;; test.spectec + def $testfalse{b : Bool($sidef(11))}(b) = b + +;; test.spectec +def $t_totalize(nat : nat) : nat + ;; test.spectec + def $t_totalize(3) = 5 + ;; test.spectec + def $t_totalize(10) = 20 + +;; test.spectec +def $t_totalize2(nat : nat) : nat + ;; test.spectec + def $t_totalize2(1) = 2 + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat + ;; test.spectec + def $t_totalize3{n : nat}(n) = ($t_totalize(n) + $t_totalize2((n + 10))) + +== IL Validation after pass let-intro-mech... +== Running pass typefamily-removal... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool{bool : bool}(bool) = + | mk_Bool_0(var_x : nat,) + -- if (bool = true) + | mk_Bool_1(var_x : text,) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool(true)) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool(true)}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool(false)) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool(false)}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool($sidef(1))) : Bool(true) + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + +;; test.spectec +def $testfalse(Bool : Bool($sidef(11))) : Bool(false) + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + +;; test.spectec +def $t_totalize(nat : nat) : nat + ;; test.spectec + def $t_totalize(3) = 5 + ;; test.spectec + def $t_totalize(10) = 20 + +;; test.spectec +def $t_totalize2(nat : nat) : nat + ;; test.spectec + def $t_totalize2(1) = 2 + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat + ;; test.spectec + def $t_totalize3{n : nat}(n) = ($t_totalize(n) + $t_totalize2((n + 10))) + +== IL Validation after pass typefamily-removal... +== Running pass remove-indexed-types... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat + ;; test.spectec + def $t_totalize(3) = 5 + ;; test.spectec + def $t_totalize(10) = 20 + +;; test.spectec +def $t_totalize2(nat : nat) : nat + ;; test.spectec + def $t_totalize2(1) = 2 + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat + ;; test.spectec + def $t_totalize3{n : nat}(n) = ($t_totalize(n) + $t_totalize2((n + 10))) + +== IL Validation after pass remove-indexed-types... +== Running pass totalize... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass totalize... +== Running pass else... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass else... +== Running pass else-simplification... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass else-simplification... +== Running pass uncase-removal... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass uncase-removal... +== Running pass sideconditions... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- if (|`m**`| = |`n***`|) + -- if (`m**` =/= []) + -- (if (|`m*`| = |`n**`|))+{`m*` <- `m**`, `n**` <- `n***`} + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass sideconditions... +== Running pass sub-expansion... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- if (|`m**`| = |`n***`|) + -- if (`m**` =/= []) + -- (if (|`m*`| = |`n**`|))+{`m*` <- `m**`, `n**` <- `n***`} + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass sub-expansion... +== Running pass sub... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- if (|`m**`| = |`n***`|) + -- if (`m**` =/= []) + -- (if (|`m*`| = |`n**`|))+{`m*` <- `m**`, `n**` <- `n***`} + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass sub... +== Running pass alias-demut... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule _{`n***` : nat***, `m**` : nat**}: + `%|-%`(n*{n <- `n*`}*{`n*` <- `n**`}+{`n**` <- `n***`}, m*{m <- `m*`}+{`m*` <- `m**`}) + -- if (|`m**`| = |`n***`|) + -- if (`m**` =/= []) + -- (if (|`m*`| = |`n**`|))+{`m*` <- `m**`, `n**` <- `n***`} + -- (if (|n*{n <- `n*`}| = m))*{m <- `m*`, `n*` <- `n**`}+{`m*` <- `m**`, `n**` <- `n***`} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $side(side : side) : side + ;; test.spectec + def $side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($side(Side_side(n,)) = $side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass alias-demut... +== Running pass improve-ids... + +;; test.spectec +relation HasSize: `%|-%`(nat, nat) + +;; test.spectec +relation TestNestedIter: `%|-%`(nat***, nat**) + ;; test.spectec + rule mk_TestNestedIter{n_lst_lst_lst : nat***, m_lst_lst : nat**}: + `%|-%`(n_lst_lst_lst, m_lst_lst) + -- if (|m_lst_lst| = |n_lst_lst_lst|) + -- if (m_lst_lst =/= []) + -- (if (|m_lst| = |n_lst_lst|))+{m_lst <- m_lst_lst, n_lst_lst <- n_lst_lst_lst} + -- (if (|n_lst| = m))*{m <- m_lst, n_lst <- n_lst_lst}+{m_lst <- m_lst_lst, n_lst_lst <- n_lst_lst_lst} + +;; test.spectec +syntax side = + | Side(nat : nat,) + +;; test.spectec +relation wf_side: `%`(side,) + ;; test.spectec + rule side_case_0{nat : nat}: + `%`(Side_side(nat,),) + -- if (nat < 10) + +;; test.spectec +def $fun_side(v_side : side) : side + ;; test.spectec + def $fun_side{s : side}(s) = s + +;; test.spectec +def $sidef(nat : nat) : bool + ;; test.spectec + def $sidef{n : nat}(n) = true + -- if ($fun_side(Side_side(n,)) = $fun_side(Side_side(n,))) + -- wf_side: `%`(Side_side(n,),) + ;; test.spectec + def $sidef{n : nat}(n) = false + -- otherwise + +;; test.spectec +syntax Bool = + | mk_Bool_0(var_x : nat,) + | mk_Bool_1(var_x : text,) + +;; test.spectec +relation wf_Bool: `%%`(bool, Bool) + ;; test.spectec + rule Bool_case_0{bool : bool, var_x : nat}: + `%%`(bool, mk_Bool_0_Bool(var_x,)) + -- if (bool = true) + + ;; test.spectec + rule Bool_case_1{bool : bool, var_x : text}: + `%%`(bool, mk_Bool_1_Bool(var_x,)) + -- if (bool = false) + +;; test.spectec +def $proj_Bool_0(var_x : Bool) : nat? + ;; test.spectec + def $proj_Bool_0{var_x : nat}(mk_Bool_0_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_0{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $proj_Bool_1(var_x : Bool) : text? + ;; test.spectec + def $proj_Bool_1{var_x : text}(mk_Bool_1_Bool(var_x,)) = ?(var_x) + ;; test.spectec + def $proj_Bool_1{var_x : Bool}(var_x) = ?() + +;; test.spectec +def $testtrue(v_Bool : Bool) : Bool + ;; test.spectec + def $testtrue{b : nat}(mk_Bool_0_Bool(b,)) = mk_Bool_0_Bool(b,) + -- wf_Bool: `%%`(true, mk_Bool_0_Bool(b,)) + +;; test.spectec +def $testfalse(v_Bool : Bool) : Bool + ;; test.spectec + def $testfalse{b : text}(mk_Bool_1_Bool(b,)) = mk_Bool_1_Bool(b,) + -- wf_Bool: `%%`(false, mk_Bool_1_Bool(b,)) + +;; test.spectec +def $t_totalize(nat : nat) : nat? + ;; test.spectec + def $t_totalize(3) = ?(5) + ;; test.spectec + def $t_totalize(10) = ?(20) + def $t_totalize{x0 : nat}(x0) = ?() + -- otherwise + +;; test.spectec +def $t_totalize2(nat : nat) : nat? + ;; test.spectec + def $t_totalize2(1) = ?(2) + ;; test.spectec + def $t_totalize2{n : nat}(n) = $t_totalize(n) + +;; test.spectec +def $t_totalize3(nat : nat) : nat? + ;; test.spectec + def $t_totalize3{n : nat}(n) = (iter_val#2 + iter_val#1)?{iter_val#2 <- $t_totalize(n), iter_val#1 <- $t_totalize2((n + 10))} + +== IL Validation after pass improve-ids... +== Complete. diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index b209320427..fd2f1100c6 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -15,6 +15,7 @@ spectec 0.5 generator == IL Validation after pass sideconditions... == Translating to AL... == Prose Generation... +../../../../specification/wasm-1.0/B-soundness.spectec:117.8-117.45: prem_to_instrs: Yet `Externaddr_ok: `%|-%:%`(s, FUNC_externaddr(fa), FUNC_externtype(ft))` @@ -1037,6 +1038,386 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit * The external type :math:`{\mathit{xt}'}` :ref:`matches ` the external type :math:`{\mathit{xt}}`. + + +The context :math:`C` is :ref:`valid ` if: + + + * The context :math:`C` is of the form :math:`\{ \mathsf{types}~{{\mathit{ft}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{ft}}_2^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{gt}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tt}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{mt}}^\ast},\;\allowbreak \mathsf{locals}~{{\mathit{lct}}^\ast},\;\allowbreak \mathsf{labels}~{{\mathit{rt}}^\ast},\;\allowbreak \mathsf{return}~{{\mathit{rt}'}^?} \}`. + + * For all :math:`{\mathit{ft}}` in :math:`{{\mathit{ft}}^\ast}`: + + * The function type :math:`{\mathit{ft}}` is :ref:`valid `. + + * For all :math:`{\mathit{gt}}` in :math:`{{\mathit{gt}}^\ast}`: + + * The global type :math:`{\mathit{gt}}` is :ref:`valid `. + + * For all :math:`{\mathit{mt}}` in :math:`{{\mathit{mt}}^\ast}`: + + * The memory type :math:`{\mathit{mt}}` is :ref:`valid `. + + * For all :math:`{\mathit{tt}}` in :math:`{{\mathit{tt}}^\ast}`: + + * The table type :math:`{\mathit{tt}}` is :ref:`valid `. + + * For all :math:`{\mathit{ft}}_2` in :math:`{{\mathit{ft}}_2^\ast}`: + + * The function type :math:`{\mathit{ft}}_2` is :ref:`valid `. + + + + +The value :math:`(t{.}\mathsf{const}~c_t)` is :ref:`valid ` with the number type :math:`t`. + + + + +The result :math:`{\mathit{result}}` is :ref:`valid ` with the number type sequence :math:`{t^\ast}` if: + + + * Either: + + * The result :math:`{\mathit{result}}` is of the form :math:`{v^\ast}`. + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`v` in :math:`{v^\ast}`: + + * The value :math:`v` is :ref:`valid ` with the number type :math:`t`. + + * Or: + + * The result :math:`{\mathit{result}}` is of the form :math:`\mathsf{trap}`. + + + + +The result :math:`{v^\ast}` is :ref:`valid ` with the number type sequence :math:`{t^\ast}` if: + + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`v` in :math:`{v^\ast}`: + + * The value :math:`v` is :ref:`valid ` with the number type :math:`t`. + + + + +The result :math:`\mathsf{trap}` is :ref:`valid ` with the number type sequence :math:`{t^\ast}`. + + + + +The export instance :math:`\{ \mathsf{name}~{\mathit{nm}},\;\allowbreak \mathsf{addr}~{\mathit{xa}} \}` is :ref:`valid ` if: + + + * The external value :math:`{\mathit{xa}}` is :ref:`valid ` with the external type :math:`{\mathit{xt}}`. + + + + +The module instance :math:`\{ \mathsf{types}~{{\mathit{functype}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{funcaddr}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globaladdr}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tableaddr}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{memaddr}}^\ast},\;\allowbreak \mathsf{exports}~{{\mathit{exportinst}}^\ast} \}` is :ref:`valid ` with the context :math:`\{ \mathsf{types}~{{\mathit{functype}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{functype}}_{\mathsf{f}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globaltype}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tabletype}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{memtype}}^\ast},\;\allowbreak \mathsf{return}~\epsilon \}` if: + + + * For all :math:`{\mathit{functype}}` in :math:`{{\mathit{functype}}^\ast}`: + + * The function type :math:`{\mathit{functype}}` is :ref:`valid `. + + * For all :math:`{\mathit{globaladdr}}` in :math:`{{\mathit{globaladdr}}^\ast}`, and corresponding :math:`{\mathit{globaltype}}` in :math:`{{\mathit{globaltype}}^\ast}`: + + * The external value :math:`(\mathsf{global}~{\mathit{globaladdr}})` is :ref:`valid ` with the external type :math:`(\mathsf{global}~{\mathit{globaltype}})`. + + * For all :math:`{\mathit{funcaddr}}` in :math:`{{\mathit{funcaddr}}^\ast}`, and corresponding :math:`{\mathit{functype}}_{\mathsf{f}}` in :math:`{{\mathit{functype}}_{\mathsf{f}}^\ast}`: + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{\mathit{functype}}_{\mathsf{f}})`. + + * For all :math:`{\mathit{memaddr}}` in :math:`{{\mathit{memaddr}}^\ast}`, and corresponding :math:`{\mathit{memtype}}` in :math:`{{\mathit{memtype}}^\ast}`: + + * The external value :math:`(\mathsf{mem}~{\mathit{memaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{mem}~{\mathit{memtype}})`. + + * For all :math:`{\mathit{tableaddr}}` in :math:`{{\mathit{tableaddr}}^\ast}`, and corresponding :math:`{\mathit{tabletype}}` in :math:`{{\mathit{tabletype}}^\ast}`: + + * The external value :math:`(\mathsf{table}~{\mathit{tableaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{table}~{\mathit{tabletype}})`. + + * For all :math:`{\mathit{exportinst}}` in :math:`{{\mathit{exportinst}}^\ast}`: + + * The export instance :math:`{\mathit{exportinst}}` is :ref:`valid `. + + * :math:`{{\mathit{exportinst}}{.}\mathsf{name}^\ast}~{\mathrm{disjoint}}` is true. + + * The length of :math:`{(\mathsf{global}~{\mathit{globaladdr}})^\ast}~{(\mathsf{mem}~{\mathit{memaddr}})^\ast}~{(\mathsf{table}~{\mathit{tableaddr}})^\ast}~{(\mathsf{func}~{\mathit{funcaddr}})^\ast}` is greater than :math:`0`. + + * For all :math:`{\mathit{exportinst}}` in :math:`{{\mathit{exportinst}}^\ast}`: + + * :math:`{\mathit{exportinst}}{.}\mathsf{addr}` is contained in :math:`{(\mathsf{global}~{\mathit{globaladdr}})^\ast}~{(\mathsf{mem}~{\mathit{memaddr}})^\ast}~{(\mathsf{table}~{\mathit{tableaddr}})^\ast}~{(\mathsf{func}~{\mathit{funcaddr}})^\ast}`. + + + + +The frame :math:`\{ \mathsf{locals}~{{\mathit{val}}^\ast},\;\allowbreak \mathsf{module}~{\mathit{moduleinst}} \}` is :ref:`valid ` with the context :math:`C` with the field :math:`\mathsf{locals}` appended by :math:`{t^\ast}` if: + + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid ` with the context :math:`C`. + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`{\mathit{val}}` in :math:`{{\mathit{val}}^\ast}`: + + * The value :math:`{\mathit{val}}` is :ref:`valid ` with the number type :math:`t`. + + + + +:math:`{\mathit{instr}}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}` if: + + + * Either: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`{\mathit{instr}}`. + + * The instruction :math:`{\mathit{instr}}` is :ref:`valid ` with the function type :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`({{\mathsf{label}}_{n}}{\{}~{{\mathit{instr}'}^\ast}~\}~{{{\mathit{instr}}'}^\ast})`. + + * The number type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The number type sequence :math:`{{\mathit{valtype}'}^\ast}` is of the form :math:`{t^?}`. + + * The length of :math:`{{t'}^?}` is equal to :math:`n`. + + * :math:`{{\mathit{instr}'}^\ast}` is valid with :math:`{{t'}^?}~\rightarrow~{t^?}`. + + * :math:`{{{\mathit{instr}}'}^\ast}` is valid with :math:`\epsilon~\rightarrow~{t^?}`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`({{\mathsf{frame}}_{n}}{\{}~f~\}~{{{\mathit{instr}}'}^\ast})`. + + * The number type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The number type sequence :math:`{{\mathit{valtype}'}^\ast}` is of the form :math:`{t^?}`. + + * The length of :math:`{t^?}` is equal to :math:`n`. + + * The frame :math:`f` is :ref:`valid ` with the context :math:`{C'}`. + + * :math:`{{{\mathit{instr}}'}^\ast}` is valid with :math:`{t^?}`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`(\mathsf{call}~{\mathit{funcaddr}})`. + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast})`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`\mathsf{trap}`. + + + + +:math:`{\mathit{instr}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * The instruction :math:`{\mathit{instr}}` is :ref:`valid ` with the function type :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`({{\mathsf{label}}_{n}}{\{}~{{\mathit{instr}}^\ast}~\}~{{\mathit{instr}}^\ast})` is valid with :math:`\epsilon~\rightarrow~{t^?}` if: + + + * The length of :math:`{{t'}^?}` is equal to :math:`n`. + + * :math:`{{\mathit{instr}'}^\ast}` is valid with :math:`{{t'}^?}~\rightarrow~{t^?}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`\epsilon~\rightarrow~{t^?}`. + + + + +:math:`({{\mathsf{frame}}_{n}}{\{}~f~\}~{{\mathit{instr}}^\ast})` is valid with :math:`\epsilon~\rightarrow~{t^?}` if: + + + * The length of :math:`{t^?}` is equal to :math:`n`. + + * The frame :math:`f` is :ref:`valid ` with the context :math:`{C'}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^?}`. + + + + +:math:`(\mathsf{call}~{\mathit{funcaddr}})` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{t_1^\ast}~\rightarrow~{t_2^\ast})`. + + + + +:math:`\mathsf{trap}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}` if: + + + * Either: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is empty. + + * The number type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The number type sequence :math:`{{\mathit{valtype}'}^\ast}` is empty. + + * Or: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is of the form :math:`{{\mathit{instr}}}_1~{{{\mathit{instr}}}_2^\ast}`. + + * :math:`{{\mathit{instr}}}_1` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{t_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_2^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + * Or: + + * The number type sequence :math:`{{\mathit{valtype}}^\ast}` is of the form :math:`{t^\ast}~{t_1^\ast}`. + + * The number type sequence :math:`{{\mathit{valtype}'}^\ast}` is of the form :math:`{t^\ast}~{t_2^\ast}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`\epsilon` is valid with :math:`\epsilon~\rightarrow~\epsilon`. + + + + +:math:`{{\mathit{instr}}}_1~{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_3^\ast}` if: + + + * :math:`{{\mathit{instr}}}_1` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_2^\ast}~\rightarrow~{t_3^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^\ast}~{t_1^\ast}~\rightarrow~{t^\ast}~{t_2^\ast}` if: + + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^?}` if: + + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`\epsilon~\rightarrow~{t^?}`. + + + + +The global instance :math:`\{ \mathsf{type}~({\mathit{mut}}~t),\;\allowbreak \mathsf{value}~{\mathit{val}} \}` is :ref:`valid ` with the global type :math:`({\mathit{mut}}~t)` if: + + + * The global type :math:`({\mathit{mut}}~t)` is :ref:`valid `. + + * The value :math:`{\mathit{val}}` is :ref:`valid ` with the number type :math:`t`. + + + + +The memory instance :math:`\{ \mathsf{type}~{}[ n .. m ],\;\allowbreak \mathsf{bytes}~{b^\ast} \}` is :ref:`valid ` with the memory type :math:`{}[ n .. m ]` if: + + + * The memory type :math:`{}[ n .. m ]` is :ref:`valid `. + + * The length of :math:`{b^\ast}` is equal to :math:`n \cdot 64 \, {\mathrm{Ki}}`. + + + + +The table instance :math:`\{ \mathsf{type}~{}[ n .. m ],\;\allowbreak \mathsf{refs}~{({{\mathit{fa}}^?})^\ast} \}` is :ref:`valid ` with the table type :math:`{}[ n .. m ]` if: + + + * The table type :math:`{}[ n .. m ]` is :ref:`valid `. + + * For all :math:`{\mathit{fa?}}` in :math:`{{\mathit{fa?}}^\ast}`: + + * The function address :math:`{\mathit{fa?}}` is absent if and only if the function type :math:`{\mathit{ft?}}` is absent. + + * :math:`{{\mathit{ft?}}^\ast}` is the concatenation of all such :math:`{\mathit{ft?}}`. + + * For all :math:`{\mathit{fa?}}` in :math:`{{\mathit{fa?}}^\ast}`, and corresponding :math:`{\mathit{ft?}}` in :math:`{{\mathit{ft?}}^\ast}`: + + * YetS: TODO: prem_to_intrs iter. + + * The length of :math:`{({{\mathit{fa}}^?})^\ast}` is equal to :math:`n`. + + + + +The function instance :math:`\{ \mathsf{type}~{\mathit{ft}},\;\allowbreak \mathsf{module}~{\mathit{moduleinst}},\;\allowbreak \mathsf{code}~{\mathit{func}} \}` is :ref:`valid ` with the function type :math:`{\mathit{ft}}` if: + + + * The function type :math:`{\mathit{ft}}` is :ref:`valid `. + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid ` with the context :math:`C`. + + * The function :math:`{\mathit{func}}` is :ref:`valid ` with the function type :math:`{\mathit{ft}}`. + + + + +The store :math:`s` is :ref:`valid ` if: + + + * For all : + + * The global instance :math:`{\mathit{globalinst}}` is :ref:`valid ` with the global type :math:`{\mathit{globaltype}}`. + + * :math:`{{\mathit{globalinst}}^\ast}` is the concatenation of all such :math:`{\mathit{globalinst}}`. + + * For all : + + * The memory instance :math:`{\mathit{meminst}}` is :ref:`valid ` with the memory type :math:`{\mathit{memtype}}`. + + * :math:`{{\mathit{meminst}}^\ast}` is the concatenation of all such :math:`{\mathit{meminst}}`. + + * For all : + + * The table instance :math:`{\mathit{tableinst}}` is :ref:`valid ` with the table type :math:`{\mathit{tabletype}}`. + + * :math:`{{\mathit{tableinst}}^\ast}` is the concatenation of all such :math:`{\mathit{tableinst}}`. + + * For all : + + * The function instance :math:`{\mathit{funcinst}}` is :ref:`valid ` with the function type :math:`{\mathit{functype}}`. + + * :math:`{{\mathit{funcinst}}^\ast}` is the concatenation of all such :math:`{\mathit{funcinst}}`. + + * The store :math:`s` is of the form :math:`\{ \mathsf{funcs}~{{\mathit{funcinst}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globalinst}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tableinst}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{meminst}}^\ast} \}`. + + + + +The state :math:`(s, f)` is :ref:`valid ` with the context :math:`C` if: + + + * The store :math:`s` is :ref:`valid `. + + * The frame :math:`f` is :ref:`valid ` with the context :math:`C`. + + + + +The configuration :math:`(s, f)~;~{{\mathit{instr}}^\ast}` is :ref:`valid ` with the result type :math:`{t^?}` if: + + + * The state :math:`(s, f)` is :ref:`valid ` with the context :math:`C`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^?}`. + + :math:`\mathsf{load}~t~{\mathit{ao}}` ..................................... @@ -1726,11 +2107,13 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit a. Return :math:`\epsilon`. -#. Assert: Due to validation, :math:`{|{X^\ast}|} = 1`. +#. If :math:`{|{X^\ast}|} = 1`, then: -#. Let :math:`w` be :math:`{X^\ast}`. + a. Let :math:`w` be :math:`{X^\ast}`. -#. Return :math:`w`. + #. Return :math:`w`. + +#. Fail. :math:`{X^?}` @@ -1780,9 +2163,11 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit a. Return :math:`23`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: + + a. Return :math:`52`. -#. Return :math:`52`. +#. Fail. :math:`{\mathrm{expon}}(N)` @@ -1793,9 +2178,11 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit a. Return :math:`8`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: -#. Return :math:`11`. + a. Return :math:`11`. + +#. Fail. :math:`M` @@ -3225,6 +3612,7 @@ spectec 0.5 generator == IL Validation after pass sideconditions... == Translating to AL... == Prose Generation... +../../../../specification/wasm-1.0/B-soundness.spectec:117.8-117.45: prem_to_instrs: Yet `Externaddr_ok: `%|-%:%`(s, FUNC_externaddr(fa), FUNC_externtype(ft))` Limits_ok - the limits ([ n .. m? ]) is valid with k if: - n is less than or equal to k. @@ -3751,6 +4139,200 @@ Externaddr_ok/sub - xt is valid. - xt' matches xt. +Context_ok +- the context C is valid if: + - C is { TYPES: ft*; FUNCS: ft_2*; GLOBALS: gt*; TABLES: tt*; MEMS: mt*; LOCALS: lct*; LABELS: ?(rt)*; RETURN: ?(rt'?) }. + - For all ft in ft*: + - the function type ft is valid. + - For all gt in gt*: + - the global type gt is valid. + - For all mt in mt*: + - the memory type mt is valid. + - For all tt in tt*: + - the table type tt is valid. + - For all ft_2 in ft_2*: + - the function type ft_2 is valid. + +Val_ok +- the value (t.CONST c_t) is valid with the number type t. + +Result_ok +- the result result is valid with the number type sequence t* if: + - Either: + - result is (_VALS v*). + - For all t in t*, and corresponding v in v*: + - the value v is valid with the number type t. + - Or: + - result is TRAP. + +Result_ok/result +- the result (_VALS v*) is valid with the number type sequence t* if: + - For all t in t*, and corresponding v in v*: + - the value v is valid with the number type t. + +Result_ok/trap +- the result TRAP is valid with t*. + +Exportinst_ok +- the export instance { NAME: nm; ADDR: xa } is valid if: + - the external value xa is valid with the external type xt. + +Moduleinst_ok +- the module instance { TYPES: functype*; FUNCS: funcaddr*; GLOBALS: globaladdr*; TABLES: tableaddr*; MEMS: memaddr*; EXPORTS: exportinst* } is valid with the context { TYPES: functype*; FUNCS: functype_F*; GLOBALS: globaltype*; TABLES: tabletype*; MEMS: memtype*; RETURN: ?() } if: + - For all functype in functype*: + - the function type functype is valid. + - For all globaladdr in globaladdr*, and corresponding globaltype in globaltype*: + - the external value (GLOBAL globaladdr) is valid with the external type (GLOBAL globaltype). + - For all funcaddr in funcaddr*, and corresponding functype_F in functype_F*: + - the external value (FUNC funcaddr) is valid with the external type (FUNC functype_F). + - For all memaddr in memaddr*, and corresponding memtype in memtype*: + - the external value (MEM memaddr) is valid with the external type (MEM memtype). + - For all tableaddr in tableaddr*, and corresponding tabletype in tabletype*: + - the external value (TABLE tableaddr) is valid with the external type (TABLE tabletype). + - For all exportinst in exportinst*: + - the export instance exportinst is valid. + - $disjoint_(`name, exportinst.NAME*) is true. + - |(GLOBAL globaladdr)* :: (MEM memaddr)* :: (TABLE tableaddr)* :: (FUNC funcaddr)*| is greater than 0. + - For all exportinst in exportinst*: + - exportinst.ADDR is contained in (GLOBAL globaladdr)* :: (MEM memaddr)* :: (TABLE tableaddr)* :: (FUNC funcaddr)*. + +Frame_ok +- the frame { LOCALS: val*; MODULE: moduleinst } is valid with the context C with .LOCALS appended by t* if: + - the module instance moduleinst is valid with the context C. + - For all t in t*, and corresponding val in val*: + - the value val is valid with the number type t. + +Instr_ok2 +- admininstr is valid with valtype* -> valtype'* if: + - Either: + - the administrative instruction admininstr is instr. + - the instruction instr is valid with the function type valtype* -> valtype'*. + - Or: + - admininstr is (LABEL_ n { instr'* } admininstr'*). + - the number type sequence valtype* is []. + - the number type sequence valtype'* is t?. + - |t'?| is n. + - instr'* is valid with t'? -> t?. + - admininstr'* is valid with [] -> t?. + - Or: + - admininstr is (FRAME_ n { f } admininstr'*). + - valtype* is []. + - valtype'* is t?. + - |t?| is n. + - the frame f is valid with the context C'. + - admininstr'* is valid with t?. + - Or: + - admininstr is (CALL_ADDR funcaddr). + - the external value (FUNC funcaddr) is valid with the external type (FUNC valtype* -> valtype'*). + - Or: + - admininstr is TRAP. + +Instr_ok2/plain +- instr is valid with t_1* -> t_2* if: + - the instruction instr is valid with the function type t_1* -> t_2*. + +Instr_ok2/label +- (LABEL_ n { instr* } admininstr*) is valid with [] -> t? if: + - |t'?| is n. + - instr'* is valid with t'? -> t?. + - admininstr* is valid with [] -> t?. + +Instr_ok2/frame +- (FRAME_ n { f } admininstr*) is valid with [] -> t? if: + - |t?| is n. + - the frame f is valid with the context C'. + - admininstr* is valid with t?. + +Instr_ok2/call_addr +- (CALL_ADDR funcaddr) is valid with t_1* -> t_2* if: + - the external value (FUNC funcaddr) is valid with the external type (FUNC t_1* -> t_2*). + +Instr_ok2/trap +- TRAP is valid with t_1* -> t_2*. + +Instrs_ok2 +- admininstr* is valid with valtype* -> valtype'* if: + - Either: + - the administrative instruction sequence admininstr* is []. + - the number type sequence valtype* is []. + - the number type sequence valtype'* is []. + - Or: + - admininstr* is [admininstr_1] :: admininstr_2*. + - admininstr_1 is valid with valtype* -> t_2*. + - admininstr_2* is valid with t_2* -> valtype'*. + - Or: + - valtype* is t* :: t_1*. + - valtype'* is t* :: t_2*. + - admininstr* is valid with t_1* -> t_2*. + +Instrs_ok2/empty +- [] is valid with [] -> []. + +Instrs_ok2/seq +- [admininstr_1] :: admininstr_2* is valid with t_1* -> t_3* if: + - admininstr_1 is valid with t_1* -> t_2*. + - admininstr_2* is valid with t_2* -> t_3*. + +Instrs_ok2/frame +- admininstr* is valid with t* :: t_1* -> t* :: t_2* if: + - admininstr* is valid with t_1* -> t_2*. + +Expr_ok2 +- admininstr* is valid with t? if: + - admininstr* is valid with [] -> t?. + +Globalinst_ok +- the global instance { TYPE: (mut t); VALUE: val } is valid with the global type (mut t) if: + - (mut t) is valid. + - the value val is valid with the number type t. + +Meminst_ok +- the memory instance { TYPE: ([ n .. ?(m) ]); BYTES: b* } is valid with the memory type ([ n .. ?(m) ]) if: + - ([ n .. ?(m) ]) is valid. + - |b*| is (n * (64 * $Ki())). + +Tableinst_ok +- the table instance { TYPE: ([ n .. ?(m) ]); REFS: fa?* } is valid with the table type ([ n .. ?(m) ]) if: + - ([ n .. ?(m) ]) is valid. + - For all fa? in fa?*: + - the function address fa? is ?() if and only if the function type ft? is ?(). + - ft?* is the concatenation of all such ft?. + - For all fa? in fa?*, and corresponding ft? in ft?*: + - - Yet: TODO: prem_to_intrs iter. + - |fa?*| is n. + +Funcinst_ok +- the function instance { TYPE: ft; MODULE: moduleinst; CODE: func } is valid with the function type ft if: + - ft is valid. + - the module instance moduleinst is valid with the context C. + - the function func is valid with ft. + +Store_ok +- the store s is valid if: + - For all : + - the global instance globalinst is valid with the global type globaltype. + - globalinst* is the concatenation of all such globalinst. + - For all : + - the memory instance meminst is valid with the memory type memtype. + - meminst* is the concatenation of all such meminst. + - For all : + - the table instance tableinst is valid with the table type tabletype. + - tableinst* is the concatenation of all such tableinst. + - For all : + - the function instance funcinst is valid with the function type functype. + - funcinst* is the concatenation of all such funcinst. + - s is { FUNCS: funcinst*; GLOBALS: globalinst*; TABLES: tableinst*; MEMS: meminst* }. + +State_ok +- the state (s, f) is valid with the context C if: + - the store s is valid. + - the frame f is valid with C. + +Config_ok +- the configuration (s, f) ; instr* is valid with the result type t? if: + - the state (s, f) is valid with the context C. + - admininstr* is valid with t?. + Step_read/load-num-* t ?() ao 1. Let z be the current state. 2. Assert: Due to validation, a value of value type I32 is on the top of the stack. @@ -4068,9 +4650,10 @@ sum n''* opt_ `X X* 1. If (X* = []), then: a. Return ?(). -2. Assert: Due to validation, (|X*| = 1). -3. Let [w] be X*. -4. Return ?(w). +2. If (|X*| = 1), then: + a. Let [w] be X*. + b. Return ?(w). +3. Fail. list_ `X X? 1. If X? is not defined, then: @@ -4093,14 +4676,16 @@ disjoint_ `X X* signif N 1. If (N = 32), then: a. Return 23. -2. Assert: Due to validation, (N = 64). -3. Return 52. +2. If (N = 64), then: + a. Return 52. +3. Fail. expon N 1. If (N = 32), then: a. Return 8. -2. Assert: Due to validation, (N = 64). -3. Return 11. +2. If (N = 64), then: + a. Return 11. +3. Fail. M N 1. Return $signif(N). @@ -6371,6 +6956,528 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit * The external type :math:`{\mathit{xt}'}` :ref:`matches ` the external type :math:`{\mathit{xt}}`. + + +The context :math:`C` is :ref:`valid ` if: + + + * The context :math:`C` is of the form :math:`\{ \mathsf{types}~{{\mathit{ft}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{ft}}_2^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{gt}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tt}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{mt}}^\ast},\;\allowbreak \mathsf{elems}~{{\mathit{et}}^\ast},\;\allowbreak \mathsf{datas}~{{\mathit{ok}}^\ast},\;\allowbreak \mathsf{locals}~{{\mathit{lct}}^\ast},\;\allowbreak \mathsf{labels}~{{\mathit{rt}}^\ast},\;\allowbreak \mathsf{return}~{{\mathit{rt}'}^?} \}`. + + * For all :math:`{\mathit{ft}}` in :math:`{{\mathit{ft}}^\ast}`: + + * The function type :math:`{\mathit{ft}}` is :ref:`valid `. + + * For all :math:`{\mathit{gt}}` in :math:`{{\mathit{gt}}^\ast}`: + + * The global type :math:`{\mathit{gt}}` is :ref:`valid `. + + * For all :math:`{\mathit{mt}}` in :math:`{{\mathit{mt}}^\ast}`: + + * The memory type :math:`{\mathit{mt}}` is :ref:`valid `. + + * For all :math:`{\mathit{tt}}` in :math:`{{\mathit{tt}}^\ast}`: + + * The table type :math:`{\mathit{tt}}` is :ref:`valid `. + + * For all :math:`{\mathit{ft}}_2` in :math:`{{\mathit{ft}}_2^\ast}`: + + * The function type :math:`{\mathit{ft}}_2` is :ref:`valid `. + + + + +The reference :math:`{\mathit{ref}}` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}` if: + + + * Either: + + * The reference :math:`{\mathit{ref}}` is of the form :math:`(\mathsf{ref{.}null}~{\mathit{rt}'})`. + + * Or: + + * The reference :math:`{\mathit{ref}}` is of the form :math:`(\mathsf{ref{.}func\_addr}~a)`. + + * The reference type :math:`{\mathit{rt}}` is of the form :math:`\mathsf{funcref}`. + + * The external value :math:`(\mathsf{func}~a)` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{\mathit{ext}})`. + * Or: + + * The reference :math:`{\mathit{ref}}` is of the form :math:`(\mathsf{ref{.}host\_addr}~a)`. + + * The reference type :math:`{\mathit{rt}}` is of the form :math:`\mathsf{externref}`. + + + + +The reference :math:`(\mathsf{ref{.}null}~{\mathit{rt}})` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + + + +The reference :math:`(\mathsf{ref{.}func\_addr}~a)` is :ref:`valid ` with the reference type :math:`\mathsf{funcref}` if: + + + * The external value :math:`(\mathsf{func}~a)` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{\mathit{ext}})`. + + + + +The reference :math:`(\mathsf{ref{.}host\_addr}~a)` is :ref:`valid ` with the reference type :math:`\mathsf{externref}`. + + + + +The value :math:`{\mathit{val}}` is :ref:`valid ` with the value type :math:`{\mathit{valtype}}` if: + + + * Either: + + * The value :math:`{\mathit{val}}` is of the form :math:`({\mathit{nt}}{.}\mathsf{const}~c_t)`. + + * The value type :math:`{\mathit{valtype}}` is of the form :math:`{\mathit{nt}}`. + + * Or: + + * The value :math:`{\mathit{val}}` is of the form :math:`({\mathit{vt}}{.}\mathsf{const}~c_t)`. + + * The value type :math:`{\mathit{valtype}}` is of the form :math:`{\mathit{vt}}`. + * Or: + + * The value :math:`{\mathit{val}}` is of the form :math:`r`. + + * The value type :math:`{\mathit{valtype}}` is of the form :math:`{\mathit{rt}}`. + + * The reference :math:`r` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + + + +The value :math:`({\mathit{nt}}{.}\mathsf{const}~c_t)` is :ref:`valid ` with the value type :math:`{\mathit{nt}}`. + + + + +The value :math:`({\mathit{vt}}{.}\mathsf{const}~c_t)` is :ref:`valid ` with the value type :math:`{\mathit{vt}}`. + + + + +The value :math:`r` is :ref:`valid ` with the value type :math:`{\mathit{rt}}` if: + + + * The reference :math:`r` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + + + +The result :math:`{\mathit{result}}` is :ref:`valid ` with the value type sequence :math:`{t^\ast}` if: + + + * Either: + + * The result :math:`{\mathit{result}}` is of the form :math:`{v^\ast}`. + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`v` in :math:`{v^\ast}`: + + * The value :math:`v` is :ref:`valid ` with the value type :math:`t`. + + * Or: + + * The result :math:`{\mathit{result}}` is of the form :math:`\mathsf{trap}`. + + + + +The result :math:`{v^\ast}` is :ref:`valid ` with the value type sequence :math:`{t^\ast}` if: + + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`v` in :math:`{v^\ast}`: + + * The value :math:`v` is :ref:`valid ` with the value type :math:`t`. + + + + +The result :math:`\mathsf{trap}` is :ref:`valid ` with the value type sequence :math:`{t^\ast}`. + + + + +The data instance :math:`\{ \mathsf{bytes}~{b^\ast} \}` is :ref:`valid ` with the data type :math:`\mathsf{ok}`. + + + + +The element instance :math:`\{ \mathsf{type}~{\mathit{rt}},\;\allowbreak \mathsf{refs}~{{\mathit{ref}}^\ast} \}` is :ref:`valid ` with the element type :math:`{\mathit{rt}}` if: + + + * For all :math:`{\mathit{ref}}` in :math:`{{\mathit{ref}}^\ast}`: + + * The reference :math:`{\mathit{ref}}` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + + + +The export instance :math:`\{ \mathsf{name}~{\mathit{nm}},\;\allowbreak \mathsf{addr}~{\mathit{xa}} \}` is :ref:`valid ` if: + + + * The external value :math:`{\mathit{xa}}` is :ref:`valid ` with the external type :math:`{\mathit{xt}}`. + + + + +The module instance :math:`\{ \mathsf{types}~{{\mathit{functype}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{funcaddr}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globaladdr}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tableaddr}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{memaddr}}^\ast},\;\allowbreak \mathsf{elems}~{{\mathit{elemaddr}}^\ast},\;\allowbreak \mathsf{datas}~{{\mathit{dataaddr}}^\ast},\;\allowbreak \mathsf{exports}~{{\mathit{exportinst}}^\ast} \}` is :ref:`valid ` with the context :math:`\{ \mathsf{types}~{{\mathit{functype}}^\ast},\;\allowbreak \mathsf{funcs}~{{\mathit{functype}}_{\mathsf{f}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globaltype}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tabletype}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{memtype}}^\ast},\;\allowbreak \mathsf{elems}~{{\mathit{elemtype}}^\ast},\;\allowbreak \mathsf{datas}~{{\mathit{datatype}}^\ast},\;\allowbreak \mathsf{return}~\epsilon \}` if: + + + * For all :math:`{\mathit{functype}}` in :math:`{{\mathit{functype}}^\ast}`: + + * The function type :math:`{\mathit{functype}}` is :ref:`valid `. + + * For all :math:`{\mathit{globaladdr}}` in :math:`{{\mathit{globaladdr}}^\ast}`, and corresponding :math:`{\mathit{globaltype}}` in :math:`{{\mathit{globaltype}}^\ast}`: + + * The external value :math:`(\mathsf{global}~{\mathit{globaladdr}})` is :ref:`valid ` with the external type :math:`(\mathsf{global}~{\mathit{globaltype}})`. + + * For all :math:`{\mathit{funcaddr}}` in :math:`{{\mathit{funcaddr}}^\ast}`, and corresponding :math:`{\mathit{functype}}_{\mathsf{f}}` in :math:`{{\mathit{functype}}_{\mathsf{f}}^\ast}`: + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{\mathit{functype}}_{\mathsf{f}})`. + + * For all :math:`{\mathit{memaddr}}` in :math:`{{\mathit{memaddr}}^\ast}`, and corresponding :math:`{\mathit{memtype}}` in :math:`{{\mathit{memtype}}^\ast}`: + + * The external value :math:`(\mathsf{mem}~{\mathit{memaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{mem}~{\mathit{memtype}})`. + + * For all :math:`{\mathit{tableaddr}}` in :math:`{{\mathit{tableaddr}}^\ast}`, and corresponding :math:`{\mathit{tabletype}}` in :math:`{{\mathit{tabletype}}^\ast}`: + + * The external value :math:`(\mathsf{table}~{\mathit{tableaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{table}~{\mathit{tabletype}})`. + + * For all :math:`{\mathit{exportinst}}` in :math:`{{\mathit{exportinst}}^\ast}`: + + * The export instance :math:`{\mathit{exportinst}}` is :ref:`valid `. + + * For all :math:`{\mathit{dataaddr}}` in :math:`{{\mathit{dataaddr}}^\ast}`: + + * The data instance :math:`s{.}\mathsf{datas}{}[{\mathit{dataaddr}}]` exists. + + * For all :math:`{\mathit{dataaddr}}` in :math:`{{\mathit{dataaddr}}^\ast}`, and corresponding :math:`{\mathit{datatype}}` in :math:`{{\mathit{datatype}}^\ast}`: + + * The data instance :math:`s{.}\mathsf{datas}{}[{\mathit{dataaddr}}]` is :ref:`valid ` with the data type :math:`{\mathit{datatype}}`. + + * For all :math:`{\mathit{elemaddr}}` in :math:`{{\mathit{elemaddr}}^\ast}`: + + * The element instance :math:`s{.}\mathsf{elems}{}[{\mathit{elemaddr}}]` exists. + + * For all :math:`{\mathit{elemaddr}}` in :math:`{{\mathit{elemaddr}}^\ast}`, and corresponding :math:`{\mathit{elemtype}}` in :math:`{{\mathit{elemtype}}^\ast}`: + + * The element instance :math:`s{.}\mathsf{elems}{}[{\mathit{elemaddr}}]` is :ref:`valid ` with the element type :math:`{\mathit{elemtype}}`. + + * :math:`{{\mathit{exportinst}}{.}\mathsf{name}^\ast}~{\mathrm{disjoint}}` is true. + + * The length of :math:`{(\mathsf{global}~{\mathit{globaladdr}})^\ast}~{(\mathsf{mem}~{\mathit{memaddr}})^\ast}~{(\mathsf{table}~{\mathit{tableaddr}})^\ast}~{(\mathsf{func}~{\mathit{funcaddr}})^\ast}` is greater than :math:`0`. + + * For all :math:`{\mathit{exportinst}}` in :math:`{{\mathit{exportinst}}^\ast}`: + + * :math:`{\mathit{exportinst}}{.}\mathsf{addr}` is contained in :math:`{(\mathsf{global}~{\mathit{globaladdr}})^\ast}~{(\mathsf{mem}~{\mathit{memaddr}})^\ast}~{(\mathsf{table}~{\mathit{tableaddr}})^\ast}~{(\mathsf{func}~{\mathit{funcaddr}})^\ast}`. + + + + +The frame :math:`\{ \mathsf{locals}~{{\mathit{val}}^\ast},\;\allowbreak \mathsf{module}~{\mathit{moduleinst}} \}` is :ref:`valid ` with the context :math:`C` with the field :math:`\mathsf{locals}` appended by :math:`{t^\ast}` if: + + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid ` with the context :math:`C`. + + * For all :math:`t` in :math:`{t^\ast}`, and corresponding :math:`{\mathit{val}}` in :math:`{{\mathit{val}}^\ast}`: + + * The value :math:`{\mathit{val}}` is :ref:`valid ` with the value type :math:`t`. + + + + +:math:`{\mathit{instr}}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}` if: + + + * Either: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`{\mathit{instr}}`. + + * The instruction :math:`{\mathit{instr}}` is :ref:`valid ` with the function type :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`({{\mathsf{label}}_{n}}{\{}~{{\mathit{instr}'}^\ast}~\}~{{{\mathit{instr}}'}^\ast})`. + + * The value type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * :math:`{{\mathit{instr}'}^\ast}` is valid with :math:`{{t'}^{n}}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + + * :math:`{{{\mathit{instr}}'}^\ast}` is valid with :math:`\epsilon~\rightarrow~{{\mathit{valtype}'}^\ast}`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`({{\mathsf{frame}}_{n}}{\{}~f~\}~{{{\mathit{instr}}'}^\ast})`. + + * The value type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The frame :math:`f` is :ref:`valid ` with the context :math:`{C'}`. + + * :math:`{{{\mathit{instr}}'}^\ast}` is valid with :math:`{{\mathit{valtype}'}^{n}}`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`(\mathsf{call}~{\mathit{funcaddr}})`. + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast})`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`{\mathit{ref}}`. + + * The value type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The value type sequence :math:`{{\mathit{valtype}'}^\ast}` is of the form :math:`{\mathit{rt}}`. + + * The reference :math:`{\mathit{ref}}` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + * Or: + + * The administrative instruction :math:`{\mathit{instr}}` is of the form :math:`\mathsf{trap}`. + + + + +:math:`{\mathit{instr}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * The instruction :math:`{\mathit{instr}}` is :ref:`valid ` with the function type :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`({{\mathsf{label}}_{n}}{\{}~{{\mathit{instr}}^\ast}~\}~{{\mathit{instr}}^\ast})` is valid with :math:`\epsilon~\rightarrow~{t^\ast}` if: + + + * :math:`{{\mathit{instr}'}^\ast}` is valid with :math:`{{t'}^{n}}~\rightarrow~{t^\ast}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`\epsilon~\rightarrow~{t^\ast}`. + + + + +:math:`({{\mathsf{frame}}_{n}}{\{}~f~\}~{{\mathit{instr}}^\ast})` is valid with :math:`\epsilon~\rightarrow~{t^{n}}` if: + + + * The frame :math:`f` is :ref:`valid ` with the context :math:`{C'}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^{n}}`. + + + + +:math:`(\mathsf{call}~{\mathit{funcaddr}})` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * The external value :math:`(\mathsf{func}~{\mathit{funcaddr}})` is :ref:`valid ` with the external type :math:`(\mathsf{func}~{t_1^\ast}~\rightarrow~{t_2^\ast})`. + + + + +:math:`{\mathit{ref}}` is valid with :math:`\epsilon~\rightarrow~{\mathit{rt}}` if: + + + * The reference :math:`{\mathit{ref}}` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + + + +:math:`\mathsf{trap}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}` if: + + + * Either: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is empty. + + * The value type sequence :math:`{{\mathit{valtype}}^\ast}` is empty. + + * The value type sequence :math:`{{\mathit{valtype}'}^\ast}` is empty. + + * Or: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is of the form :math:`{{\mathit{instr}}}_1~{{{\mathit{instr}}}_2^\ast}`. + + * :math:`{{\mathit{instr}}}_1` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{t_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_2^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + * Or: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is of the form :math:`{{\mathit{instr}}^\ast}`. + + * :math:`{{{\mathit{instr}}'}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + * The result type :math:`{{\mathit{valtype}}^\ast}` :ref:`matches ` the result type :math:`{t_1^\ast}`. + + * The result type :math:`{t_2^\ast}` :ref:`matches ` the result type :math:`{{\mathit{valtype}'}^\ast}`. + * Or: + + * The value type sequence :math:`{{\mathit{valtype}}^\ast}` is of the form :math:`{t^\ast}~{t_1^\ast}`. + + * The value type sequence :math:`{{\mathit{valtype}'}^\ast}` is of the form :math:`{t^\ast}~{t_2^\ast}`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`\epsilon` is valid with :math:`\epsilon~\rightarrow~\epsilon`. + + + + +:math:`{{\mathit{instr}}}_1~{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_3^\ast}` if: + + + * :math:`{{\mathit{instr}}}_1` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_2^\ast}~\rightarrow~{t_3^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{{t'}_1^\ast}~\rightarrow~{{t'}_2^\ast}` if: + + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + * The result type :math:`{{t'}_1^\ast}` :ref:`matches ` the result type :math:`{t_1^\ast}`. + + * The result type :math:`{t_2^\ast}` :ref:`matches ` the result type :math:`{{t'}_2^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^\ast}~{t_1^\ast}~\rightarrow~{t^\ast}~{t_2^\ast}` if: + + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^\ast}` if: + + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`\epsilon~\rightarrow~{t^\ast}`. + + + + +The global instance :math:`\{ \mathsf{type}~({\mathit{mut}}~t),\;\allowbreak \mathsf{value}~{\mathit{val}} \}` is :ref:`valid ` with the global type :math:`({\mathit{mut}}~t)` if: + + + * The global type :math:`({\mathit{mut}}~t)` is :ref:`valid `. + + * The value :math:`{\mathit{val}}` is :ref:`valid ` with the value type :math:`t`. + + + + +The memory instance :math:`\{ \mathsf{type}~{}[ n .. m ]~\mathsf{page},\;\allowbreak \mathsf{bytes}~{b^\ast} \}` is :ref:`valid ` with the memory type :math:`{}[ n .. m ]~\mathsf{page}` if: + + + * The memory type :math:`{}[ n .. m ]~\mathsf{page}` is :ref:`valid `. + + * The length of :math:`{b^\ast}` is equal to :math:`n \cdot 64 \, {\mathrm{Ki}}`. + + + + +The table instance :math:`\{ \mathsf{type}~({}[ n .. m ]~{\mathit{rt}}),\;\allowbreak \mathsf{refs}~{{\mathit{ref}}^\ast} \}` is :ref:`valid ` with the table type :math:`({}[ n .. m ]~{\mathit{rt}})` if: + + + * The table type :math:`({}[ n .. m ]~{\mathit{rt}})` is :ref:`valid `. + + * For all :math:`{\mathit{ref}}` in :math:`{{\mathit{ref}}^\ast}`: + + * The reference :math:`{\mathit{ref}}` is :ref:`valid ` with the reference type :math:`{\mathit{rt}}`. + + * The length of :math:`{{\mathit{ref}}^\ast}` is equal to :math:`n`. + + + + +The function instance :math:`\{ \mathsf{type}~{\mathit{ft}},\;\allowbreak \mathsf{module}~{\mathit{moduleinst}},\;\allowbreak \mathsf{code}~{\mathit{func}} \}` is :ref:`valid ` with the function type :math:`{\mathit{ft}}` if: + + + * The function type :math:`{\mathit{ft}}` is :ref:`valid `. + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid ` with the context :math:`C`. + + * The function :math:`{\mathit{func}}` is :ref:`valid ` with the function type :math:`{\mathit{ft}}`. + + + + +The store :math:`s` is :ref:`valid ` if: + + + * For all : + + * The global instance :math:`{\mathit{globalinst}}` is :ref:`valid ` with the global type :math:`{\mathit{globaltype}}`. + + * :math:`{{\mathit{globalinst}}^\ast}` is the concatenation of all such :math:`{\mathit{globalinst}}`. + + * For all : + + * The memory instance :math:`{\mathit{meminst}}` is :ref:`valid ` with the memory type :math:`{\mathit{memtype}}`. + + * :math:`{{\mathit{meminst}}^\ast}` is the concatenation of all such :math:`{\mathit{meminst}}`. + + * For all : + + * The table instance :math:`{\mathit{tableinst}}` is :ref:`valid ` with the table type :math:`{\mathit{tabletype}}`. + + * :math:`{{\mathit{tableinst}}^\ast}` is the concatenation of all such :math:`{\mathit{tableinst}}`. + + * For all : + + * The function instance :math:`{\mathit{funcinst}}` is :ref:`valid ` with the function type :math:`{\mathit{functype}}`. + + * :math:`{{\mathit{funcinst}}^\ast}` is the concatenation of all such :math:`{\mathit{funcinst}}`. + + * For all : + + * The data instance :math:`{\mathit{datainst}}` is :ref:`valid ` with the data type :math:`{\mathit{datatype}}`. + + * :math:`{{\mathit{datainst}}^\ast}` is the concatenation of all such :math:`{\mathit{datainst}}`. + + * For all : + + * The element instance :math:`{\mathit{eleminst}}` is :ref:`valid ` with the element type :math:`{\mathit{elemtype}}`. + + * :math:`{{\mathit{eleminst}}^\ast}` is the concatenation of all such :math:`{\mathit{eleminst}}`. + + * The store :math:`s` is of the form :math:`\{ \mathsf{funcs}~{{\mathit{funcinst}}^\ast},\;\allowbreak \mathsf{globals}~{{\mathit{globalinst}}^\ast},\;\allowbreak \mathsf{tables}~{{\mathit{tableinst}}^\ast},\;\allowbreak \mathsf{mems}~{{\mathit{meminst}}^\ast},\;\allowbreak \mathsf{elems}~{{\mathit{eleminst}}^\ast},\;\allowbreak \mathsf{datas}~{{\mathit{datainst}}^\ast} \}`. + + + + +The state :math:`(s, f)` is :ref:`valid ` with the context :math:`C` if: + + + * The store :math:`s` is :ref:`valid `. + + * The frame :math:`f` is :ref:`valid ` with the context :math:`C`. + + + + +The configuration :math:`(s, f)~;~{{\mathit{instr}}^\ast}` is :ref:`valid ` with the result type :math:`{t^\ast}` if: + + + * The state :math:`(s, f)` is :ref:`valid ` with the context :math:`C`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^\ast}`. + + :math:`\mathsf{table{.}copy}~x~y` ................................. @@ -10262,9 +11369,11 @@ The external value :math:`{\mathit{externaddr}}` is :ref:`valid ` wit a. Return :math:`(\mathsf{ref{.}null}~\mathsf{funcref})`. -#. Assert: Due to validation, :math:`{\mathit{valtype}} = \mathsf{externref}`. +#. If :math:`{\mathit{valtype}} = \mathsf{externref}`, then: -#. Return :math:`(\mathsf{ref{.}null}~\mathsf{externref})`. + a. Return :math:`(\mathsf{ref{.}null}~\mathsf{externref})`. + +#. Fail. :math:`{\mathrm{funcs}}({{\mathit{externaddr}'}^\ast})` @@ -12030,6 +13139,275 @@ Externaddr_ok/sub - xt is valid. - xt' matches xt. +Context_ok +- the context C is valid if: + - C is { TYPES: ft*; FUNCS: ft_2*; GLOBALS: gt*; TABLES: tt*; MEMS: mt*; ELEMS: et*; DATAS: ok*; LOCALS: lct*; LABELS: [rt*]; RETURN: ?(rt'?) }. + - For all ft in ft*: + - the function type ft is valid. + - For all gt in gt*: + - the global type gt is valid. + - For all mt in mt*: + - the memory type mt is valid. + - For all tt in tt*: + - the table type tt is valid. + - For all ft_2 in ft_2*: + - the function type ft_2 is valid. + +Ref_ok +- the reference ref is valid with the reference type rt if: + - Either: + - ref is (REF.NULL rt'). + - Or: + - ref is (REF.FUNC_ADDR a). + - rt is FUNCREF. + - the external value (FUNC a) is valid with the external type (FUNC ext). + - Or: + - ref is (REF.HOST_ADDR a). + - rt is EXTERNREF. + +Ref_ok/null +- the reference (REF.NULL rt) is valid with rt. + +Ref_ok/func +- the reference (REF.FUNC_ADDR a) is valid with the reference type FUNCREF if: + - the external value (FUNC a) is valid with the external type (FUNC ext). + +Ref_ok/extern +- the reference (REF.HOST_ADDR a) is valid with the reference type EXTERNREF. + +Val_ok +- the value val is valid with the value type valtype if: + - Either: + - val is (nt.CONST c_t). + - valtype is nt. + - Or: + - val is (vt.CONST c_t). + - valtype is vt. + - Or: + - val is r. + - valtype is rt. + - the reference r is valid with the reference type rt. + +Val_ok/numtype +- the value (nt.CONST c_t) is valid with the value type nt. + +Val_ok/vectype +- the value (vt.CONST c_t) is valid with the value type vt. + +Val_ok/reftype +- the value r is valid with the value type rt if: + - r is valid with rt. + +Result_ok +- the result result is valid with the value type sequence t* if: + - Either: + - result is (_VALS v*). + - For all t in t*, and corresponding v in v*: + - the value v is valid with the value type t. + - Or: + - result is TRAP. + +Result_ok/result +- the result (_VALS v*) is valid with the value type sequence t* if: + - For all t in t*, and corresponding v in v*: + - the value v is valid with the value type t. + +Result_ok/trap +- the result TRAP is valid with t*. + +Datainst_ok +- the data instance { BYTES: b* } is valid with the data type OK. + +Eleminst_ok +- the element instance { TYPE: rt; REFS: ref* } is valid with the element type rt if: + - For all ref in ref*: + - the reference ref is valid with rt. + +Exportinst_ok +- the export instance { NAME: nm; ADDR: xa } is valid if: + - the external value xa is valid with the external type xt. + +Moduleinst_ok +- the module instance { TYPES: functype*; FUNCS: funcaddr*; GLOBALS: globaladdr*; TABLES: tableaddr*; MEMS: memaddr*; ELEMS: elemaddr*; DATAS: dataaddr*; EXPORTS: exportinst* } is valid with the context { TYPES: functype*; FUNCS: functype_F*; GLOBALS: globaltype*; TABLES: tabletype*; MEMS: memtype*; ELEMS: elemtype*; DATAS: datatype*; RETURN: ?() } if: + - For all functype in functype*: + - the function type functype is valid. + - For all globaladdr in globaladdr*, and corresponding globaltype in globaltype*: + - the external value (GLOBAL globaladdr) is valid with the external type (GLOBAL globaltype). + - For all funcaddr in funcaddr*, and corresponding functype_F in functype_F*: + - the external value (FUNC funcaddr) is valid with the external type (FUNC functype_F). + - For all memaddr in memaddr*, and corresponding memtype in memtype*: + - the external value (MEM memaddr) is valid with the external type (MEM memtype). + - For all tableaddr in tableaddr*, and corresponding tabletype in tabletype*: + - the external value (TABLE tableaddr) is valid with the external type (TABLE tabletype). + - For all exportinst in exportinst*: + - the export instance exportinst is valid. + - For all dataaddr in dataaddr*: + - the data instance s.DATAS[dataaddr] exists. + - For all dataaddr in dataaddr*, and corresponding datatype in datatype*: + - s.DATAS[dataaddr] is valid with the data type datatype. + - For all elemaddr in elemaddr*: + - the element instance s.ELEMS[elemaddr] exists. + - For all elemaddr in elemaddr*, and corresponding elemtype in elemtype*: + - s.ELEMS[elemaddr] is valid with the element type elemtype. + - $disjoint_(`name, exportinst.NAME*) is true. + - |(GLOBAL globaladdr)* :: (MEM memaddr)* :: (TABLE tableaddr)* :: (FUNC funcaddr)*| is greater than 0. + - For all exportinst in exportinst*: + - exportinst.ADDR is contained in (GLOBAL globaladdr)* :: (MEM memaddr)* :: (TABLE tableaddr)* :: (FUNC funcaddr)*. + +Frame_ok +- the frame { LOCALS: val*; MODULE: moduleinst } is valid with the context C with .LOCALS appended by t* if: + - the module instance moduleinst is valid with the context C. + - For all t in t*, and corresponding val in val*: + - the value val is valid with the value type t. + +Instr_ok2 +- admininstr is valid with valtype* -> valtype'* if: + - Either: + - the administrative instruction admininstr is instr. + - the instruction instr is valid with the function type valtype* -> valtype'*. + - Or: + - admininstr is (LABEL_ n { instr'* } admininstr'*). + - the value type sequence valtype* is []. + - instr'* is valid with t'^n -> valtype'*. + - admininstr'* is valid with [] -> valtype'*. + - Or: + - admininstr is (FRAME_ n { f } admininstr'*). + - valtype* is []. + - the frame f is valid with the context C'. + - admininstr'* is valid with valtype'^n. + - Or: + - admininstr is (CALL_ADDR funcaddr). + - the external value (FUNC funcaddr) is valid with the external type (FUNC valtype* -> valtype'*). + - Or: + - admininstr is ref. + - valtype* is []. + - the value type sequence valtype'* is [rt]. + - the reference ref is valid with the reference type rt. + - Or: + - admininstr is TRAP. + +Instr_ok2/plain +- instr is valid with t_1* -> t_2* if: + - the instruction instr is valid with the function type t_1* -> t_2*. + +Instr_ok2/label +- (LABEL_ n { instr* } admininstr*) is valid with [] -> t* if: + - instr'* is valid with t'^n -> t*. + - admininstr* is valid with [] -> t*. + +Instr_ok2/frame +- (FRAME_ n { f } admininstr*) is valid with [] -> t^n if: + - the frame f is valid with the context C'. + - admininstr* is valid with t^n. + +Instr_ok2/call_addr +- (CALL_ADDR funcaddr) is valid with t_1* -> t_2* if: + - the external value (FUNC funcaddr) is valid with the external type (FUNC t_1* -> t_2*). + +Instr_ok2/ref +- ref is valid with [] -> [rt] if: + - the reference ref is valid with the reference type rt. + +Instr_ok2/trap +- TRAP is valid with t_1* -> t_2*. + +Instrs_ok2 +- admininstr* is valid with valtype* -> valtype'* if: + - Either: + - the administrative instruction sequence admininstr* is []. + - the value type sequence valtype* is []. + - the value type sequence valtype'* is []. + - Or: + - admininstr* is [admininstr_1] :: admininstr_2*. + - admininstr_1 is valid with valtype* -> t_2*. + - admininstr_2* is valid with t_2* -> valtype'*. + - Or: + - admininstr* is instr*. + - admininstr'* is valid with t_1* -> t_2*. + - valtype* matches the result type t_1*. + - the result type t_2* matches valtype'*. + - Or: + - valtype* is t* :: t_1*. + - valtype'* is t* :: t_2*. + - admininstr* is valid with t_1* -> t_2*. + +Instrs_ok2/empty +- [] is valid with [] -> []. + +Instrs_ok2/seq +- [admininstr_1] :: admininstr_2* is valid with t_1* -> t_3* if: + - admininstr_1 is valid with t_1* -> t_2*. + - admininstr_2* is valid with t_2* -> t_3*. + +Instrs_ok2/sub +- instr* is valid with t'_1* -> t'_2* if: + - admininstr* is valid with t_1* -> t_2*. + - the result type t'_1* matches the result type t_1*. + - the result type t_2* matches the result type t'_2*. + +Instrs_ok2/frame +- admininstr* is valid with t* :: t_1* -> t* :: t_2* if: + - admininstr* is valid with t_1* -> t_2*. + +Expr_ok2 +- admininstr* is valid with t* if: + - admininstr* is valid with [] -> t*. + +Globalinst_ok +- the global instance { TYPE: (mut t); VALUE: val } is valid with the global type (mut t) if: + - (mut t) is valid. + - the value val is valid with the value type t. + +Meminst_ok +- the memory instance { TYPE: ([ n .. ?(m) ]) PAGE; BYTES: b* } is valid with the memory type ([ n .. ?(m) ]) PAGE if: + - ([ n .. ?(m) ]) PAGE is valid. + - |b*| is (n * (64 * $Ki())). + +Tableinst_ok +- the table instance { TYPE: (([ n .. ?(m) ]) rt); REFS: ref* } is valid with the table type (([ n .. ?(m) ]) rt) if: + - (([ n .. ?(m) ]) rt) is valid. + - For all ref in ref*: + - the reference ref is valid with the reference type rt. + - |ref*| is n. + +Funcinst_ok +- the function instance { TYPE: ft; MODULE: moduleinst; CODE: func } is valid with the function type ft if: + - ft is valid. + - the module instance moduleinst is valid with the context C. + - the function func is valid with ft. + +Store_ok +- the store s is valid if: + - For all : + - the global instance globalinst is valid with the global type globaltype. + - globalinst* is the concatenation of all such globalinst. + - For all : + - the memory instance meminst is valid with the memory type memtype. + - meminst* is the concatenation of all such meminst. + - For all : + - the table instance tableinst is valid with the table type tabletype. + - tableinst* is the concatenation of all such tableinst. + - For all : + - the function instance funcinst is valid with the function type functype. + - funcinst* is the concatenation of all such funcinst. + - For all : + - the data instance datainst is valid with the data type datatype. + - datainst* is the concatenation of all such datainst. + - For all : + - the element instance eleminst is valid with the element type elemtype. + - eleminst* is the concatenation of all such eleminst. + - s is { FUNCS: funcinst*; GLOBALS: globalinst*; TABLES: tableinst*; MEMS: meminst*; ELEMS: eleminst*; DATAS: datainst* }. + +State_ok +- the state (s, f) is valid with the context C if: + - the store s is valid. + - the frame f is valid with C. + +Config_ok +- the configuration (s, f) ; instr* is valid with the result type t* if: + - the state (s, f) is valid with the context C. + - admininstr* is valid with t*. + Step_read/table.copy-trap-* x y 1. Let z be the current state. 2. Assert: Due to validation, a value of value type I32 is on the top of the stack. @@ -13882,8 +15260,9 @@ default_ valtype a. Return (V128.CONST 0). 6. If (valtype = FUNCREF), then: a. Return (REF.NULL FUNCREF). -7. Assert: Due to validation, (valtype = EXTERNREF). -8. Return (REF.NULL EXTERNREF). +7. If (valtype = EXTERNREF), then: + a. Return (REF.NULL EXTERNREF). +8. Fail. funcsxa externaddr'* 1. If (externaddr'* = []), then: @@ -21195,7 +22574,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #. Else: - a. Assert: Due to validation, :math:`{\mathit{nt}}` is :math:`{\mathsf{i}}{N}`. + a. Assert: Due to validation, :math:`{\mathit{nt}}` is address type. #. Let :math:`{\mathit{loadop}}_0` be :math:`{{\mathit{loadop}}^?}`. @@ -22284,7 +23663,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #. Else: - a. Assert: Due to validation, :math:`{\mathit{nt}'}` is :math:`{\mathsf{i}}{N}`. + a. Assert: Due to validation, :math:`{\mathit{nt}'}` is address type. #. Let :math:`n` be :math:`{{\mathit{storeop}}^?}`. @@ -22548,11 +23927,13 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`\epsilon`. -#. Assert: Due to validation, :math:`{|{X^\ast}|} = 1`. +#. If :math:`{|{X^\ast}|} = 1`, then: -#. Let :math:`w` be :math:`{X^\ast}`. + a. Let :math:`w` be :math:`{X^\ast}`. -#. Return :math:`w`. + #. Return :math:`w`. + +#. Fail. :math:`{\bigoplus}\, {X^\ast}` @@ -22684,9 +24065,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`23`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: + + a. Return :math:`52`. -#. Return :math:`52`. +#. Fail. :math:`{\mathrm{expon}}(N)` @@ -22697,9 +24080,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`8`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: + + a. Return :math:`11`. -#. Return :math:`11`. +#. Fail. :math:`M` @@ -23120,9 +24505,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`\mathsf{i{\scriptstyle 32}}`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: -#. Return :math:`\mathsf{i{\scriptstyle 64}}`. + a. Return :math:`\mathsf{i{\scriptstyle 64}}`. + +#. Fail. :math:`{\mathsf{f}}{N}` @@ -23133,9 +24520,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`\mathsf{f{\scriptstyle 32}}`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: + + a. Return :math:`\mathsf{f{\scriptstyle 64}}`. -#. Return :math:`\mathsf{f{\scriptstyle 64}}`. +#. Fail. :math:`{\mathsf{i}}{N}` @@ -23154,9 +24543,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`\mathsf{i{\scriptstyle 32}}`. -#. Assert: Due to validation, :math:`N = 64`. +#. If :math:`N = 64`, then: -#. Return :math:`\mathsf{i{\scriptstyle 64}}`. + a. Return :math:`\mathsf{i{\scriptstyle 64}}`. + +#. Fail. :math:`{|{\mathit{numtype}}|}` @@ -23225,9 +24616,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`{|{\mathit{storagetype}}|}`. -#. Assert: Due to validation, :math:`{\mathit{storagetype}}` is packed type. +#. If :math:`{\mathit{storagetype}}` is packed type, then: -#. Return :math:`{|{\mathit{storagetype}}|}`. + a. Return :math:`{|{\mathit{storagetype}}|}`. + +#. Fail. :math:`{|{\mathsf{i}}{N}|}` @@ -23573,25 +24966,31 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ..................................................................................... -1. If :math:`{{\mathit{typeuse}}^\ast} = \epsilon`, then: +1. If :math:`{{\mathit{typevar}}^\ast} = \epsilon` and :math:`{{\mathit{typeuse}}^\ast} = \epsilon`, then: - a. Assert: Due to validation, :math:`{{\mathit{typevar}}^\ast} = \epsilon`. + a. Return :math:`{\mathit{tv}}`. - #. Return :math:`{\mathit{tv}}`. +#. If :math:`{|{{\mathit{typeuse}}^\ast}|} < 1`, then: -#. Else: + a. Fail. - a. Let :math:`{\mathit{tu}}_1~{{\mathit{tu}'}^\ast}` be :math:`{{\mathit{typeuse}}^\ast}`. +#. Let :math:`{\mathit{tu}}_1~{{\mathit{tu}'}^\ast}` be :math:`{{\mathit{typeuse}}^\ast}`. - #. Assert: Due to validation, :math:`{|{{\mathit{typevar}}^\ast}|} \geq 1`. +#. If :math:`{|{{\mathit{typevar}}^\ast}|} < 1`, then: - #. Let :math:`{\mathit{tv}}_1~{{\mathit{tv}'}^\ast}` be :math:`{{\mathit{typevar}}^\ast}`. + a. Fail. - #. If :math:`{\mathit{tv}} = {\mathit{tv}}_1`, then: +#. Let :math:`{\mathit{tv}}_1~{{\mathit{tv}'}^\ast}` be :math:`{{\mathit{typevar}}^\ast}`. - 1) Return :math:`{\mathit{tu}}_1`. +#. If :math:`{\mathit{tv}} = {\mathit{tv}}_1`, then: - #. Return :math:`{{\mathit{tv}}}{{}[ {{\mathit{tv}'}^\ast} := {{\mathit{tu}'}^\ast} ]}`. + a. Return :math:`{\mathit{tu}}_1`. + +#. If :math:`{|{{\mathit{typevar}}^\ast}|} \geq 1`, then: + + a. Return :math:`{{\mathit{tv}}}{{}[ {{\mathit{tv}'}^\ast} := {{\mathit{tu}'}^\ast} ]}`. + +#. Fail. :math:`{\mathrm{minus}}_{\mathit{recs}}({{\mathit{typevar}}^\ast}, {{\mathit{typeuse}}^\ast})` @@ -23614,15 +25013,21 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #) Return :math:`{\mathrm{minus}}_{\mathit{recs}}({{\mathit{tv}}^\ast}, {{\mathit{tu}}^\ast})`. -#. Assert: Due to validation, :math:`{|{{\mathit{typeuse}}^\ast}|} \geq 1`. +#. If :math:`{|{{\mathit{typeuse}}^\ast}|} < 1`, then: + + a. Fail. #. Let :math:`{\mathit{tu}}_1~{{\mathit{tu}}^\ast}` be :math:`{{\mathit{typeuse}}^\ast}`. -#. Assert: Due to validation, :math:`{|{{\mathit{typevar}}^\ast}|} \geq 1`. +#. If :math:`{|{{\mathit{typevar}}^\ast}|} < 1`, then: + + a. Fail. #. Let :math:`{\mathit{typevar}}_0~{{\mathit{tv}}^\ast}` be :math:`{{\mathit{typevar}}^\ast}`. -#. Assert: Due to validation, :math:`{\mathit{typevar}}_0` is some :math:`{\mathit{typeidx}}`. +#. If :math:`{\mathit{typevar}}_0` is not some :math:`{\mathit{typeidx}}`, then: + + a. Fail. #. Let :math:`x` be the type variable :math:`{\mathit{typevar}}_0`. @@ -25123,22 +26528,24 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ................................................................................................................... -1. If :math:`{{\mathit{localtype}}^\ast} = \epsilon`, then: +1. If :math:`{{\mathit{localidx}}^\ast} = \epsilon` and :math:`{{\mathit{localtype}}^\ast} = \epsilon`, then: - a. Assert: Due to validation, :math:`{{\mathit{localidx}}^\ast} = \epsilon`. + a. Return :math:`C`. - #. Return :math:`C`. +#. If :math:`{|{{\mathit{localtype}}^\ast}|} < 1`, then: -#. Else: + a. Fail. - a. Let :math:`{{\mathit{lt}}}_1~{{{\mathit{lt}}}^\ast}` be :math:`{{\mathit{localtype}}^\ast}`. +#. Let :math:`{{\mathit{lt}}}_1~{{{\mathit{lt}}}^\ast}` be :math:`{{\mathit{localtype}}^\ast}`. - #. Assert: Due to validation, :math:`{|{{\mathit{localidx}}^\ast}|} \geq 1`. +#. If :math:`{|{{\mathit{localidx}}^\ast}|} \geq 1`, then: - #. Let :math:`x_1~{x^\ast}` be :math:`{{\mathit{localidx}}^\ast}`. + a. Let :math:`x_1~{x^\ast}` be :math:`{{\mathit{localidx}}^\ast}`. #. Return :math:`C{}[{.}\mathsf{locals}{}[x_1] = {{\mathit{lt}}}_1]` with the local types of :math:`{x^\ast}` updated to :math:`{{{\mathit{lt}}}^\ast}`. +#. Fail. + :math:`{{{\mathrm{clos}}^\ast}}{({{\mathit{deftype}}^\ast})}` ............................................................. @@ -25238,7 +26645,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ................................................. -1. If :math:`{\mathit{valtype}}` is :math:`{\mathsf{i}}{N}`, then: +1. If :math:`{\mathit{valtype}}` is address type, then: a. Return :math:`({\mathit{valtype}}{.}\mathsf{const}~0)`. @@ -25246,11 +26653,13 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`({\mathit{valtype}}{.}\mathsf{const}~{+0})`. -#. If :math:`{\mathit{valtype}}` is :math:`{\mathsf{v}}{N}`, then: +#. If :math:`{\mathit{valtype}}` is vector type, then: a. Return :math:`({\mathit{valtype}}{.}\mathsf{const}~0)`. -#. Assert: Due to validation, :math:`{\mathit{valtype}}` is some :math:`\mathsf{ref}~{\mathsf{null}^?}~{\mathit{heaptype}}`. +#. If :math:`{\mathit{valtype}}` is not some :math:`\mathsf{ref}~{\mathsf{null}^?}~{\mathit{heaptype}}`, then: + + a. Fail. #. Let :math:`(\mathsf{ref}~{{\mathit{NULL}}_0^?}~{\mathit{ht}})` be the destructuring of :math:`{\mathit{valtype}}`. @@ -25258,9 +26667,11 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`\mathsf{ref{.}null}`. -#. Assert: Due to validation, :math:`{{\mathit{NULL}}_0^?}` is not defined. +#. If :math:`{{\mathit{NULL}}_0^?}` is not defined, then: -#. Return :math:`\epsilon`. + a. Return :math:`\epsilon`. + +#. Fail. :math:`{\mathit{zt}}` is a packed type @@ -25704,7 +27115,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ..................................................... -1. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}`, then: +1. If :math:`{\mathit{numtype}}` is address type, then: a. If :math:`{\mathit{unop}} = \mathsf{clz}`, then: @@ -25759,7 +27170,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ............................................................. -1. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}`, then: +1. If :math:`{\mathit{numtype}}` is address type, then: a. If :math:`{\mathit{binop}} = \mathsf{add}`, then: @@ -25857,7 +27268,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ............................................................. -1. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}`, then: +1. If :math:`{\mathit{numtype}}` is address type, then: a. If :math:`{\mathit{relop}} = \mathsf{eq}`, then: @@ -25922,7 +27333,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i ............................................................................. -1. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}` and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{i}}{N}`, then: +1. If :math:`{\mathit{numtype}}` is address type and :math:`{\mathit{numtype}'}` is address type, then: a. If :math:`{\mathit{cvtop}}` is some :math:`{\mathsf{extend}}{\mathsf{\_}}{{\mathit{sx}}}`, then: @@ -25934,7 +27345,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i 1) Return :math:`{{\mathrm{wrap}}}_{N_1, N_2}(i_1)`. -#. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{i}}{N}`, then: +#. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{numtype}'}` is address type, then: a. If :math:`{\mathit{cvtop}}` is some :math:`{\mathsf{trunc}}{\mathsf{\_}}{{\mathit{sx}}}`, then: @@ -25948,7 +27359,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #) Return :math:`{{{{\mathrm{trunc\_sat}}}_{N_1, N_2}^{{\mathit{sx}}}}}{(i_1)}`. -#. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}` and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{cvtop}}` is some :math:`{\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}}`, then: +#. If :math:`{\mathit{numtype}}` is address type and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{cvtop}}` is some :math:`{\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}}`, then: a. Let :math:`({\mathsf{convert}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{cvtop}}`. @@ -25964,13 +27375,13 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i 1) Return :math:`{{\mathrm{demote}}}_{N_1, N_2}(i_1)`. -#. If :math:`{\mathit{numtype}}` is :math:`{\mathsf{i}}{N}` and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{cvtop}} = \mathsf{reinterpret}` and :math:`{|{\mathit{numtype}}|} = {|{\mathit{numtype}'}|}`, then: +#. If :math:`{\mathit{numtype}}` is address type and :math:`{\mathit{numtype}'}` is :math:`{\mathsf{f}}{N}` and :math:`{\mathit{cvtop}} = \mathsf{reinterpret}` and :math:`{|{\mathit{numtype}}|} = {|{\mathit{numtype}'}|}`, then: a. Return :math:`{{\mathrm{reinterpret}}}_{{\mathit{numtype}}, {\mathit{numtype}'}}(i_1)`. #. Assert: Due to validation, :math:`{\mathit{numtype}}` is :math:`{\mathsf{f}}{N}`. -#. Assert: Due to validation, :math:`{\mathit{numtype}'}` is :math:`{\mathsf{i}}{N}`. +#. Assert: Due to validation, :math:`{\mathit{numtype}'}` is address type. #. Assert: Due to validation, :math:`{\mathit{cvtop}} = \mathsf{reinterpret}`. @@ -26655,7 +28066,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #. Assert: Due to validation, :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{f}}{N}`. -#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{N}`, then: +#. If :math:`{\mathit{lanetype}}` is address type, then: a. If :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}}`, then: @@ -26969,15 +28380,21 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`{\mathit{val}}`. -#. Assert: Due to validation, :math:`{\mathit{storagetype}}` is packed type. +#. If not :math:`{\mathit{storagetype}}` is packed type, then: -#. Assert: Due to validation, :math:`{\mathit{val}}` is some :math:`{\mathit{numtype}}{.}\mathsf{const}~{{\mathit{num}}}_{{\mathit{numtype}}}`. + a. Fail. + +#. If :math:`{\mathit{val}}` is not some :math:`{\mathit{numtype}}{.}\mathsf{const}~{{\mathit{num}}}_{{\mathit{numtype}}}`, then: + + a. Fail. #. Let :math:`({\mathit{numtype}}_0{.}\mathsf{const}~i)` be the destructuring of :math:`{\mathit{val}}`. -#. Assert: Due to validation, :math:`{\mathit{numtype}}_0 = \mathsf{i{\scriptstyle 32}}`. +#. If :math:`{\mathit{numtype}}_0 = \mathsf{i{\scriptstyle 32}}`, then: + + a. Return :math:`({\mathit{storagetype}}{.}\mathsf{pack}~{{\mathrm{wrap}}}_{32, {|{\mathit{storagetype}}|}}(i))`. -#. Return :math:`({\mathit{storagetype}}{.}\mathsf{pack}~{{\mathrm{wrap}}}_{32, {|{\mathit{storagetype}}|}}(i))`. +#. Fail. :math:`{{{{\mathrm{unpack}}}_{{\mathit{storagetype}}}^{{{\mathit{sx}'}^?}}}}{({\mathit{fieldval}})}` @@ -26988,17 +28405,23 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Return :math:`{\mathit{fieldval}}`. -#. Assert: Due to validation, :math:`{\mathit{fieldval}}` is some :math:`{\mathit{packtype}}{.}\mathsf{pack}~{i}{N}`. +#. If :math:`{\mathit{fieldval}}` is not some :math:`{\mathit{packtype}}{.}\mathsf{pack}~{i}{N}`, then: + + a. Fail. #. Let :math:`({\mathit{packtype}}{.}\mathsf{pack}~i)` be the destructuring of :math:`{\mathit{fieldval}}`. -#. Assert: Due to validation, :math:`{{\mathit{sx}'}^?}` is defined. +#. If :math:`{{\mathit{sx}'}^?}` is not defined, then: + + a. Fail. #. Let :math:`{\mathit{sx}}` be :math:`{{\mathit{sx}'}^?}`. -#. Assert: Due to validation, :math:`{\mathit{storagetype}} = {\mathit{packtype}}`. +#. If :math:`{\mathit{storagetype}} = {\mathit{packtype}}`, then: -#. Return :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, 32}^{{\mathit{sx}}}}}{(i)})`. + a. Return :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, 32}^{{\mathit{sx}}}}}{(i)})`. + +#. Fail. :math:`{\mathrm{tags}}({{\mathit{externaddr}'}^\ast})` @@ -31855,7 +33278,7 @@ Step_read/load nt loadop_? x ao b. Let c be $nbytes__1^-1(nt, $mem(z, x).BYTES[(i + ao.OFFSET) : ($size(nt) / 8)]). c. Push the value (nt.CONST c) to the stack. 5. Else: - a. Assert: Due to validation, nt is Inn. + a. Assert: Due to validation, nt is addrtype. b. Let ?(loadop_0) be loadop_?. c. Let n _ sx be loadop_0. d. If (((i + ao.OFFSET) + (n / 8)) > |$mem(z, x).BYTES|), then: @@ -32383,7 +33806,7 @@ Step/store nt storeop_? x ao b. Let b* be $nbytes_(nt', c). c. Perform $with_mem(z, x, (i + ao.OFFSET), ($size(nt') / 8), b*). 8. Else: - a. Assert: Due to validation, nt' is Inn. + a. Assert: Due to validation, nt' is addrtype. b. Let ?(n) be storeop_?. c. If (((i + ao.OFFSET) + (n / 8)) > |$mem(z, x).BYTES|), then: 1) Trap. @@ -32509,9 +33932,10 @@ prod n''* opt_ `X X* 1. If (X* = []), then: a. Return ?(). -2. Assert: Due to validation, (|X*| = 1). -3. Let [w] be X*. -4. Return ?(w). +2. If (|X*| = 1), then: + a. Let [w] be X*. + b. Return ?(w). +3. Fail. concat_ `X X* 1. If (X* = []), then: @@ -32572,14 +33996,16 @@ setproduct_ `X X* signif N 1. If (N = 32), then: a. Return 23. -2. Assert: Due to validation, (N = 64). -3. Return 52. +2. If (N = 64), then: + a. Return 52. +3. Fail. expon N 1. If (N = 32), then: a. Return 8. -2. Assert: Due to validation, (N = 64). -3. Return 11. +2. If (N = 64), then: + a. Return 11. +3. Fail. M N 1. Return $signif(N). @@ -32770,14 +34196,16 @@ NULLEXTERNREF IN N 1. If (N = 32), then: a. Return I32. -2. Assert: Due to validation, (N = 64). -3. Return I64. +2. If (N = 64), then: + a. Return I64. +3. Fail. FN N 1. If (N = 32), then: a. Return F32. -2. Assert: Due to validation, (N = 64). -3. Return F64. +2. If (N = 64), then: + a. Return F64. +3. Fail. JN N 1. If (N = 8), then: @@ -32786,8 +34214,9 @@ JN N a. Return I16. 3. If (N = 32), then: a. Return I32. -4. Assert: Due to validation, (N = 64). -5. Return I64. +4. If (N = 64), then: + a. Return I64. +5. Fail. size numtype 1. If (numtype = I32), then: @@ -32819,8 +34248,9 @@ zsize storagetype a. Return $size(storagetype). 2. If storagetype is vectype, then: a. Return $vsize(storagetype). -3. Assert: Due to validation, storagetype is packtype. -4. Return $psize(storagetype). +3. If storagetype is packtype, then: + a. Return $psize(storagetype). +4. Fail. isize Inn 1. Return $size(Inn). @@ -32978,16 +34408,19 @@ funcsxt externtype'* 5. Return $funcsxt(xt*). subst_typevar tv typevar* typeuse* -1. If (typeuse* = []), then: - a. Assert: Due to validation, (typevar* = []). - b. Return tv. -2. Else: - a. Let [tu_1] :: tu'* be typeuse*. - b. Assert: Due to validation, (|typevar*| >= 1). - c. Let [tv_1] :: tv'* be typevar*. - d. If (tv = tv_1), then: - 1) Return tu_1. - e. Return $subst_typevar(tv, tv'*, tu'*). +1. If ((typevar* = []) /\ (typeuse* = [])), then: + a. Return tv. +2. If (|typeuse*| < 1), then: + a. Fail. +3. Let [tu_1] :: tu'* be typeuse*. +4. If (|typevar*| < 1), then: + a. Fail. +5. Let [tv_1] :: tv'* be typevar*. +6. If (tv = tv_1), then: + a. Return tu_1. +7. If (|typevar*| >= 1), then: + a. Return $subst_typevar(tv, tv'*, tu'*). +8. Fail. minus_recs typevar* typeuse* 1. If (typevar* = []), then: @@ -32998,11 +34431,14 @@ minus_recs typevar* typeuse* b. If (typevar_0 is some REC /\ (|typeuse*| >= 1)), then: 1) Let [tu_1] :: tu* be typeuse*. 2) Return $minus_recs(tv*, tu*). -3. Assert: Due to validation, (|typeuse*| >= 1). +3. If (|typeuse*| < 1), then: + a. Fail. 4. Let [tu_1] :: tu* be typeuse*. -5. Assert: Due to validation, (|typevar*| >= 1). +5. If (|typevar*| < 1), then: + a. Fail. 6. Let [typevar_0] :: tv* be typevar*. -7. Assert: Due to validation, typevar_0 is some _IDX. +7. If typevar_0 is not _IDX, then: + a. Fail. 8. Let (_IDX x) be typevar_0. 9. Let (tv'*, tu'*) be $minus_recs(tv*, tu*). 10. Return ([(_IDX x)] :: tv'*, [tu_1] :: tu'*). @@ -33707,14 +35143,15 @@ dataidx_funcs func* 1. Return $free_list($free_func(func)*).DATAS. with_locals C localidx* localtype* -1. If (localtype* = []), then: - a. Assert: Due to validation, (localidx* = []). - b. Return C. -2. Else: - a. Let [lct_1] :: lct* be localtype*. - b. Assert: Due to validation, (|localidx*| >= 1). - c. Let [x_1] :: x* be localidx*. - d. Return $with_locals(C with .LOCALS[x_1] replaced by lct_1, x*, lct*). +1. If ((localidx* = []) /\ (localtype* = [])), then: + a. Return C. +2. If (|localtype*| < 1), then: + a. Fail. +3. Let [lct_1] :: lct* be localtype*. +4. If (|localidx*| >= 1), then: + a. Let [x_1] :: x* be localidx*. + b. Return $with_locals(C with .LOCALS[x_1] replaced by lct_1, x*, lct*). +5. Fail. clos_deftypes deftype* 1. If (deftype* = []), then: @@ -33760,18 +35197,20 @@ unrollht_ C heaptype 5. Return C.RECS[i]. default_ valtype -1. If valtype is Inn, then: +1. If valtype is addrtype, then: a. Return ?((valtype.CONST 0)). 2. If valtype is Fnn, then: a. Return ?((valtype.CONST $fzero($size(valtype)))). -3. If valtype is Vnn, then: +3. If valtype is vectype, then: a. Return ?((valtype.CONST 0)). -4. Assert: Due to validation, valtype is some REF. +4. If valtype is not REF, then: + a. Fail. 5. Let (REF NULL_0? ht) be valtype. 6. If (NULL_0? = ?(NULL)), then: a. Return ?(REF.NULL_ADDR). -7. Assert: Due to validation, NULL_0? is not defined. -8. Return ?(). +7. If NULL_0? is not defined, then: + a. Return ?(). +8. Fail. is_packtype zt 1. Return (zt =/= $unpack(zt)). @@ -33975,7 +35414,7 @@ cunpacknum_ storagetype c 3. Return $extend__($psize(storagetype), $size($lunpack(storagetype)), U, c). unop_ numtype unop_ i -1. If numtype is Inn, then: +1. If numtype is addrtype, then: a. If (unop_ = CLZ), then: 1) Return [$iclz_($sizenn(numtype), i)]. b. If (unop_ = CTZ), then: @@ -34002,7 +35441,7 @@ unop_ numtype unop_ i 10. Return $fnearest_($sizenn(numtype), i). binop_ numtype binop_ i_1 i_2 -1. If numtype is Inn, then: +1. If numtype is addrtype, then: a. If (binop_ = ADD), then: 1) Return [$iadd_($sizenn(numtype), i_1, i_2)]. b. If (binop_ = SUB), then: @@ -34050,7 +35489,7 @@ testop_ Inn EQZ i 1. Return $ieqz_($sizenn(Inn), i). relop_ numtype relop_ i_1 i_2 -1. If numtype is Inn, then: +1. If numtype is addrtype, then: a. If (relop_ = EQ), then: 1) Return $ieq_($sizenn(numtype), i_1, i_2). b. If (relop_ = NE), then: @@ -34082,20 +35521,20 @@ relop_ numtype relop_ i_1 i_2 9. Return $fge_($sizenn(numtype), i_1, i_2). cvtop__ numtype numtype' cvtop__ i_1 -1. If (numtype is Inn /\ numtype' is Inn), then: +1. If (numtype is addrtype /\ numtype' is addrtype), then: a. If cvtop__ is some EXTEND, then: 1) Let (EXTEND sx) be cvtop__. 2) Return [$extend__($sizenn1(numtype), $sizenn2(numtype'), sx, i_1)]. b. If (cvtop__ = WRAP), then: 1) Return [$wrap__($sizenn1(numtype), $sizenn2(numtype'), i_1)]. -2. If (numtype is Fnn /\ numtype' is Inn), then: +2. If (numtype is Fnn /\ numtype' is addrtype), then: a. If cvtop__ is some TRUNC, then: 1) Let (TRUNC sx) be cvtop__. 2) Return $trunc__($sizenn1(numtype), $sizenn2(numtype'), sx, i_1). b. If cvtop__ is some TRUNC_SAT, then: 1) Let (TRUNC_SAT sx) be cvtop__. 2) Return $trunc_sat__($sizenn1(numtype), $sizenn2(numtype'), sx, i_1). -3. If (numtype is Inn /\ (numtype' is Fnn /\ cvtop__ is some CONVERT)), then: +3. If (numtype is addrtype /\ (numtype' is Fnn /\ cvtop__ is some CONVERT)), then: a. Let (CONVERT sx) be cvtop__. b. Return [$convert__($sizenn1(numtype), $sizenn2(numtype'), sx, i_1)]. 4. If (numtype is Fnn /\ numtype' is Fnn), then: @@ -34103,10 +35542,10 @@ cvtop__ numtype numtype' cvtop__ i_1 1) Return $promote__($sizenn1(numtype), $sizenn2(numtype'), i_1). b. If (cvtop__ = DEMOTE), then: 1) Return $demote__($sizenn1(numtype), $sizenn2(numtype'), i_1). -5. If (numtype is Inn /\ (numtype' is Fnn /\ ((cvtop__ = REINTERPRET) /\ ($size(numtype) = $size(numtype'))))), then: +5. If (numtype is addrtype /\ (numtype' is Fnn /\ ((cvtop__ = REINTERPRET) /\ ($size(numtype) = $size(numtype'))))), then: a. Return [$reinterpret__(numtype, numtype', i_1)]. 6. Assert: Due to validation, numtype is Fnn. -7. Assert: Due to validation, numtype' is Inn. +7. Assert: Due to validation, numtype' is addrtype. 8. Assert: Due to validation, (cvtop__ = REINTERPRET). 9. Assert: Due to validation, ($size(numtype) = $size(numtype')). 10. Return [$reinterpret__(numtype, numtype', i_1)]. @@ -34434,7 +35873,7 @@ lcvtop__ lanetype' X M_1 lanetype X M_2 vcvtop__ c_1 2) Let c be $convert__($lsizenn1(lanetype'), $lsizenn2(lanetype), sx, c_1). 3) Return [c]. 2. Assert: Due to validation, lanetype' is Fnn. -3. If lanetype is Inn, then: +3. If lanetype is addrtype, then: a. If vcvtop__ is some TRUNC_SAT, then: 1) Let (TRUNC_SAT sx zero?) be vcvtop__. 2) Let c? be $trunc_sat__($lsizenn1(lanetype'), $lsizenn2(lanetype), sx, c_1). @@ -34582,21 +36021,27 @@ Ki packfield_ storagetype val 1. If storagetype is valtype, then: a. Return val. -2. Assert: Due to validation, storagetype is packtype. -3. Assert: Due to validation, val is some CONST. +2. If not storagetype is packtype, then: + a. Fail. +3. If val is not CONST, then: + a. Fail. 4. Let (numtype_0.CONST i) be val. -5. Assert: Due to validation, (numtype_0 = I32). -6. Return (PACK storagetype $wrap__(32, $psize(storagetype), i)). +5. If (numtype_0 = I32), then: + a. Return (PACK storagetype $wrap__(32, $psize(storagetype), i)). +6. Fail. unpackfield_ storagetype sx'? fieldval 1. If (storagetype is valtype /\ (fieldval is val /\ sx'? is not defined)), then: a. Return fieldval. -2. Assert: Due to validation, fieldval is some PACK. +2. If fieldval is not PACK, then: + a. Fail. 3. Let (PACK packtype i) be fieldval. -4. Assert: Due to validation, sx'? is defined. +4. If sx'? is not defined, then: + a. Fail. 5. Let ?(sx) be sx'?. -6. Assert: Due to validation, (storagetype = packtype). -7. Return (I32.CONST $extend__($psize(packtype), 32, sx, i)). +6. If (storagetype = packtype), then: + a. Return (I32.CONST $extend__($psize(packtype), 32, sx, i)). +7. Fail. tagsxa externaddr'* 1. If (externaddr'* = []), then: